bluetoothapitest/bluetoothsvs/common/src/T_BTUtil.cpp
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     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_BTUtil.h"
       
    19 
       
    20 //	EPOC includes
       
    21 #include <bt_sock.h>
       
    22 
       
    23 /*@{*/
       
    24 // TL2CapConfig::TChannelPriority
       
    25 _LIT(KEHigh,								"EHigh");
       
    26 _LIT(KEMedium,								"EMedium");
       
    27 _LIT(KELow,									"ELow");
       
    28 // TL2CapConfig::TChannelReliability
       
    29 _LIT(KEReliableChannel,						"EReliableChannel");
       
    30 _LIT(KEUnreliableChannel,					"EUnreliableChannel");
       
    31 // TBps
       
    32 _LIT(KEBps50,								"EBps50");
       
    33 _LIT(KEBps75,								"EBps75");
       
    34 _LIT(KEBps110,								"EBps110");
       
    35 _LIT(KEBps134,								"EBps134");
       
    36 _LIT(KEBps150,								"EBps150");
       
    37 _LIT(KEBps300,								"EBps300");
       
    38 _LIT(KEBps600,								"EBps600");
       
    39 _LIT(KEBps1200,								"EBps1200");
       
    40 _LIT(KEBps1800,								"EBps1800");
       
    41 _LIT(KEBps2000,								"EBps2000");
       
    42 _LIT(KEBps2400,								"EBps2400");
       
    43 _LIT(KEBps3600,								"EBps3600");
       
    44 _LIT(KEBps4800,								"EBps4800");
       
    45 _LIT(KEBps7200,								"EBps7200");
       
    46 _LIT(KEBps9600,								"EBps9600");
       
    47 _LIT(KEBps19200,							"EBps19200");
       
    48 _LIT(KEBps38400,							"EBps38400");
       
    49 _LIT(KEBps57600,							"EBps57600");
       
    50 _LIT(KEBps115200,							"EBps115200");
       
    51 _LIT(KEBps230400,							"EBps230400");
       
    52 _LIT(KEBps460800,							"EBps460800");
       
    53 _LIT(KEBps576000,							"EBps576000");
       
    54 _LIT(KEBps1152000,							"EBps1152000");
       
    55 _LIT(KEBps4000000,							"EBps4000000");
       
    56 _LIT(KEBps921600,							"EBps921600");
       
    57 _LIT(KEBpsAutobaud,							"EBpsAutobaud");
       
    58 _LIT(KEBpsSpecial,							"EBpsSpecial");
       
    59 // TDataBits
       
    60 _LIT(KEData5,								"EData5");
       
    61 _LIT(KEData6,								"EData6");
       
    62 _LIT(KEData7,								"EData7");
       
    63 _LIT(KEData8,								"EData8");
       
    64 // TParity
       
    65 _LIT(KEParityNone,							"EParityNone");
       
    66 _LIT(KEParityEven,							"EParityEven");
       
    67 _LIT(KEParityOdd,							"EParityOdd");
       
    68 _LIT(KEParityMark,							"EParityMark");
       
    69 _LIT(KEParitySpace,							"EParitySpace");
       
    70 // TStopBits
       
    71 _LIT(KEStop1,								"EStop1");
       
    72 _LIT(KEStop2,								"EStop2");
       
    73 // TRPNFlowCtrlMask
       
    74 _LIT(KEFCXOnOffInput,						"EFCXOnOffInput");
       
    75 _LIT(KEFCXOnOffOutput,						"EFCXOnOffOutput");
       
    76 _LIT(KEFCRTRInput,							"EFCRTRInput");
       
    77 _LIT(KEFCRTROutput,							"EFCRTROutput");
       
    78 _LIT(KEFCRTCInput,							"EFCRTCInput");
       
    79 _LIT(KEFCRTCOutput,							"EFCRTCOutput");
       
    80 //TBTSyncPackets
       
    81 _LIT(KESyncPacketsHV1,						"ESyncPacketsHV1");
       
    82 _LIT(KESyncPacketsHV2,						"ESyncPacketsHV2");
       
    83 _LIT(KESyncPacketsHV3,						"ESyncPacketsHV3");
       
    84 _LIT(KESyncPacketsEV3,						"ESyncPacketsEV3");
       
    85 _LIT(KESyncPacketsEV4,						"ESyncPacketsEV4");
       
    86 _LIT(KESyncPacketsEV5,						"ESyncPacketsEV5");
       
    87 _LIT(KESyncAnySCOPacket,					"ESyncAnySCOPacket");
       
    88 _LIT(KESyncAnyESCOPacket,					"ESyncAnyESCOPacket");
       
    89 //TBTeSCORetransmissionTypes
       
    90 _LIT(KEeSCORetransmitNone,					"EeSCORetransmitNone");
       
    91 _LIT(KEeSCORetransmitPower,					"EeSCORetransmitPower");
       
    92 _LIT(KEeSCORetransmitReliability,			"EeSCORetransmitReliability");
       
    93 _LIT(KEeSCORetransmitDontCare,				"EeSCORetransmitDontCare");
       
    94 _LIT(KSdpElementTypeNil,					"ETypeNil");
       
    95 _LIT(KSdpElementTypeUint,					"ETypeUint");
       
    96 _LIT(KSdpElementTypeInt,					"ETypeInt");
       
    97 _LIT(KSdpElementTypeUUID,					"ETypeUUID");
       
    98 _LIT(KSdpElementTypeString,					"ETypeString");
       
    99 _LIT(KSdpElementTypeBoolean,				"ETypeBoolean");
       
   100 _LIT(KSdpElementTypeDES,					"ETypeDES");
       
   101 _LIT(KSdpElementTypeDEA,					"ETypeDEA");
       
   102 _LIT(KSdpElementTypeURL,					"ETypeURL");
       
   103 _LIT(KSdpElementTypeEncoded,				"ETypeEncoded");
       
   104 
       
   105 _LIT(KCSdpAttrValueDES,						"CSdpAttrValueDES");
       
   106 _LIT(KCSdpAttrValueDEA,						"CSdpAttrValueDEA");
       
   107 _LIT(KCSdpAttrValueList,					"CSdpAttrValueList");
       
   108 
       
   109 _LIT(KLowPowerActiveMode,					"EActiveMode");
       
   110 _LIT(KLowPowerHoldMode,						"EHoldMode");
       
   111 _LIT(KLowPowerSniffMode,					"ESniffMode");
       
   112 _LIT(KLowPowerParkMode,						"EParkMode");
       
   113 _LIT(KLowPowerScatterMode,					"EScatterMode");
       
   114 _LIT(KLowPowerAnyLowPowerMode,				"EAnyLowPowerMode");
       
   115 
       
   116 _LIT(KLowPowerMode,							"lowpowermode%d");
       
   117 
       
   118 _LIT(KShutdownNormal,						"ENormal");
       
   119 _LIT(KShutdownStopInput,					"EStopInput");
       
   120 _LIT(KShutdownStopOutput,					"EStopOutput");
       
   121 _LIT(KShutdownImmediate,					"EImmediate");
       
   122 
       
   123 _LIT(KShutdownMethod,						"shutdownmethod");
       
   124 
       
   125 _LIT(KEPacketsDM1,							"EPacketsDM1");
       
   126 _LIT(KEPacketsDH1,							"EPacketsDH1");
       
   127 _LIT(KEPacketsDM3,							"EPacketsDM3");
       
   128 _LIT(KEPacketsDH3,							"EPacketsDH3");
       
   129 _LIT(KEPacketsDM5,							"EPacketsDM5");
       
   130 _LIT(KEPacketsDH5,							"EPacketsDH5");
       
   131 _LIT(KEPackets2_DH1,						"EPackets2_DH1");
       
   132 _LIT(KEPackets3_DH1,						"EPackets3_DH1");
       
   133 _LIT(KEPackets2_DH3,						"EPackets2_DH3");
       
   134 _LIT(KEPackets3_DH3,						"EPackets3_DH3");
       
   135 _LIT(KEPackets2_DH5,						"EPackets2_DH5");
       
   136 _LIT(KEPackets3_DH5,						"EPackets3_DH5");
       
   137 _LIT(KEPacketsHV1,							"EPacketsHV1");
       
   138 _LIT(KEPacketsHV2,							"EPacketsHV2");
       
   139 _LIT(KEPacketsHV3,							"EPacketsHV3");
       
   140 _LIT(KEAnyACLPacket,						"EAnyACLPacket");
       
   141 _LIT(KEAnySCOPacket,						"EAnySCOPacket");
       
   142 _LIT(KEAnyPacket,							"EAnyPacket");
       
   143 
       
   144 _LIT(KPacketTypes,							"packettypes%d");
       
   145 
       
   146 _LIT(KENotifyMaster,						"ENotifyMaster");
       
   147 _LIT(KENotifySlave,							"ENotifySlave");
       
   148 _LIT(KENotifyActiveMode,					"ENotifyActiveMode");
       
   149 _LIT(KENotifySniffMode,						"ENotifySniffMode");
       
   150 _LIT(KENotifyParkMode,						"ENotifyParkMode");
       
   151 _LIT(KENotifyHoldMode,						"ENotifyHoldMode");
       
   152 _LIT(KENotifyMaxSlots1,						"ENotifyMaxSlots1");
       
   153 _LIT(KENotifyMaxSlots3,						"ENotifyMaxSlots3");
       
   154 _LIT(KENotifyMaxSlots5,						"ENotifyMaxSlots5");
       
   155 _LIT(KENotifyPacketsDM1,					"ENotifyPacketsDM1");
       
   156 _LIT(KENotifyPacketsDH1,					"ENotifyPacketsDH1");
       
   157 _LIT(KENotifyPacketsDM3,					"ENotifyPacketsDM3");
       
   158 _LIT(KENotifyPacketsDH3,					"ENotifyPacketsDH3");
       
   159 _LIT(KENotifyPacketsDM5,					"ENotifyPacketsDM5");
       
   160 _LIT(KENotifyPacketsDH5,					"ENotifyPacketsDH5");
       
   161 _LIT(KENotifyPacketsHV1,					"ENotifyPacketsHV1");
       
   162 _LIT(KENotifyPacketsHV2,					"ENotifyPacketsHV2");
       
   163 _LIT(KENotifyPacketsHV3,					"ENotifyPacketsHV3");
       
   164 _LIT(KENotifyAuthenticationComplete,		"ENotifyAuthenticationComplete");
       
   165 _LIT(KENotifyEncryptionChangeOn,			"ENotifyEncryptionChangeOn");
       
   166 _LIT(KENotifyEncryptionChangeOff,			"ENotifyEncryptionChangeOff");
       
   167 _LIT(KENotifyPhysicalLinkUp,				"ENotifyPhysicalLinkUp");
       
   168 _LIT(KENotifyPhysicalLinkDown,				"ENotifyPhysicalLinkDown");
       
   169 _LIT(KENotifyPhysicalLinkError,				"ENotifyPhysicalLinkError");
       
   170 _LIT(KENotifySynchronousLinkUp,				"ENotifySynchronousLinkUp");
       
   171 _LIT(KENotifySynchronousLinkDown,			"ENotifySynchronousLinkDown");
       
   172 _LIT(KENotifySynchronousLinkError,			"ENotifySynchronousLinkError");
       
   173 _LIT(KENotifySCOLinkUp,						"ENotifySCOLinkUp");
       
   174 _LIT(KENotifySCOLinkDown,					"ENotifySCOLinkDown");
       
   175 _LIT(KENotifySCOLinkError,					"ENotifySCOLinkError");
       
   176 //TBTPhysicalLinkStateNotifierCombinations
       
   177 _LIT(KENotifyAnyRole,						"ENotifyAnyRole");
       
   178 _LIT(KENotifyAnyLowPowerMode,				"ENotifyAnyLowPowerMode");
       
   179 _LIT(KENotifyAnyPowerMode,					"ENotifyAnyPowerMode");
       
   180 _LIT(KENotifyAnyMaxSlots,					"ENotifyAnyMaxSlots");
       
   181 _LIT(KENotifyAnyACLPacketType,				"ENotifyAnyACLPacketType");
       
   182 _LIT(KENotifyAnySCOPacketType,				"ENotifyAnySCOPacketType");
       
   183 _LIT(KENotifyAnyPacketType,					"ENotifyAnyPacketType");
       
   184 _LIT(KENotifyAnyPhysicalLinkState,			"ENotifyAnyPhysicalLinkState");
       
   185 
       
   186 //TShutdown
       
   187 _LIT(KBaseBandMode,										"basebandmode%d");
       
   188 
       
   189 //TAvdtpServiceCategory 
       
   190 _LIT(KAvdtpServiceCategoryNull,							"EServiceCategoryNull");
       
   191 _LIT(KAvdtpServiceCategoryMediaTransport,				"EServiceCategoryMediaTransport");
       
   192 _LIT(KAvdtpServiceCategoryReporting,					"EServiceCategoryReporting");
       
   193 _LIT(KAvdtpServiceCategoryRecovery,						"EServiceCategoryRecovery");
       
   194 _LIT(KAvdtpServiceCategoryContentProtection,			"EServiceCategoryContentProtection");
       
   195 _LIT(KAvdtpServiceCategoryHeaderCompression,			"EServiceCategoryHeaderCompression");
       
   196 _LIT(KAvdtpServiceCategoryMultiplexing,					"EServiceCategoryMultiplexing");
       
   197 _LIT(KAvdtpServiceCategoryMediaCodec,					"EServiceCategoryMediaCodec");
       
   198 _LIT(KNumberOfAvdtpServiceCategories,					"ENumberOfServiceCategories");
       
   199 _LIT(KALLAvdtpServiceCategories,						"EAllServiceCategories");
       
   200 
       
   201 //TAvdtpRecoveryType 
       
   202 _LIT(KAvdtpRecoveryTypeEForbidden,						"EForbiddenRecovery");
       
   203 _LIT(KAvdtpRecoveryTypeERFC2733,						"ERFC2733Recovery");
       
   204 
       
   205 //TAvdtpSignallingErrorCode
       
   206 _LIT(KAvdtpBadHeaderFormat,								"EAvdtpBadHeaderFormat");
       
   207 _LIT(KAvdtpBadLength,									"EAvdtpBadLength");
       
   208 _LIT(KEAvdtpBadACPSEID,									"EAvdtpBadACPSEID");
       
   209 _LIT(KAvdtpSEPInUse,									"EAvdtpSEPInUse");
       
   210 _LIT(KAvdtpSepNotInUse,									"EAvdtpSepNotInUse");
       
   211 _LIT(KAvdtpBadServCategory,								"EAvdtpBadServCategory");
       
   212 _LIT(KAvdtpBadPayloadFormat,							"EAvdtpBadPayloadFormat");
       
   213 _LIT(KAvdtpNotSupportedCommand,							"EAvdtpNotSupportedCommand");
       
   214 _LIT(KAvdtpInvalidCapabilities,							"EAvdtpInvalidCapabilities");
       
   215 _LIT(KAvdtpBadRecoveryType,								"EAvdtpBadRecoveryType");
       
   216 _LIT(KAvdtpBadMediaTransportFormat,						"EAvdtpBadMediaTransportFormat");
       
   217 _LIT(KAvdtpBadReportingFormat,							"EAvdtpBadReportingFormat");
       
   218 _LIT(KAvdtpBadRecoveryFormat,							"EAvdtpBadRecoveryFormat");
       
   219 _LIT(KAvdtpBadRohcFormat,								"EAvdtpBadRohcFormat");
       
   220 _LIT(KAvdtpBadCpFormat,									"EAvdtpBadCpFormat");
       
   221 _LIT(KAvdtpBadMultiplexingFormat,						"EAvdtpBadMultiplexingFormat");
       
   222 _LIT(KAvdtpUnsupportedConfiguration,					"EAvdtpUnsupportedConfiguration");
       
   223 _LIT(KAvdtpBadState,									"EAvdtpBadState");
       
   224 
       
   225 //TGavdpSignallingErrorCode
       
   226 _LIT(KGavdpBadService,									"EGavdpBadService");
       
   227 _LIT(KGavdpInsufficientResource,						"EGavdpInsufficientResource");
       
   228 
       
   229 //TA2dpSignallingErrorCode
       
   230 _LIT(KA2dpInvalidCodec,									"EA2dpInvalidCodec");
       
   231 _LIT(KA2dpNotSupportedCodec,							"EA2dpNotSupportedCodec");
       
   232 _LIT(KA2dpInvalidSamplingFrequency,						"EA2dpInvalidSamplingFrequency");
       
   233 _LIT(KA2dpNotSupportedSamplingFrequency,				"EA2dpNotSupportedSamplingFrequency");
       
   234 _LIT(KA2dpInvalidChannelMode,							"EA2dpInvalidChannelMode");
       
   235 _LIT(KA2dpNotSupportedChannelMode,						"EA2dpNotSupportedChannelMode");
       
   236 _LIT(KA2dpInvalidSubbands,								"EA2dpInvalidSubbands");
       
   237 _LIT(KA2dpNotSupportedSubbands,							"EA2dpNotSupportedSubbands");
       
   238 _LIT(KA2dpInvalidAllocationMethod,						"EA2dpInvalidAllocationMethod");
       
   239 _LIT(KA2dpNotSupportedAllocationMethod,					"EA2dpNotSupportedAllocationMethod");
       
   240 _LIT(KA2dpInvalidMinimumBitPoolValue,					"EA2dpInvalidMinimumBitPoolValue");
       
   241 _LIT(KA2dpNotSupportedMinimumBitPoolValue,				"EA2dpNotSupportedMinimumBitPoolValue");
       
   242 _LIT(KA2dpInvalidMaximumBitPoolValue,					"EA2dpInvalidMaximumBitPoolValue");
       
   243 _LIT(KA2dpNotSupportedMaximumBitPoolValue,				"EA2dpNotSupportedMaximumBitPoolValue");
       
   244 _LIT(KA2dpInvalidLayer,									"EA2dpInvalidLayer");
       
   245 _LIT(KA2dpNotSupportedLayer,							"EA2dpNotSupportedLayer");
       
   246 _LIT(KA2dpNotSupportedCRC,								"EA2dpNotSupportedCRC");
       
   247 _LIT(KA2dpNotSupportedMPF,								"EA2dpNotSupportedMPF");
       
   248 _LIT(KA2dpNotSupportedVBR,								"EA2dpNotSupportedVBR");
       
   249 _LIT(KA2dpInvalidBitRate,								"EA2dpInvalidBitRate");
       
   250 _LIT(KA2dpNotSupportedBitRate,							"EA2dpNotSupportedBitRate");
       
   251 _LIT(KA2dpInvalidObjectType,							"EA2dpInvalidObjectType");
       
   252 _LIT(KA2dpNotSupportedObjectType,						"EA2dpNotSupportedObjectType");
       
   253 _LIT(KA2dpInvalidChannels,								"EA2dpInvalidChannels");
       
   254 _LIT(KA2dpNotSupportedChannels,							"EA2dpNotSupportedChannels");
       
   255 _LIT(KA2dpInvalidVersion,								"EA2dpInvalidVersion");
       
   256 _LIT(KA2dpNotSupportedVersion,							"EA2dpNotSupportedVersion");
       
   257 _LIT(KA2dpNotSupportedSUL,								"EA2dpNotSupportedSUL");
       
   258 _LIT(KA2dpInvalidBlockLength,							"EA2dpInvalidBlockLength");
       
   259 _LIT(KA2dpInvalidCPType,								"EA2dpInvalidCPType");
       
   260 _LIT(KA2dpInvalidCPFormat,								"EA2dpInvalidCPFormat");
       
   261 
       
   262 //TVdpSignallingErrorCode
       
   263 _LIT(KVdpInvalidCodecType,								"EVdpInvalidCodecType");
       
   264 _LIT(KVdpNotSupportedCodecType,							"EVdpNotSupportedCodecType");
       
   265 _LIT(KVdpInvalidLevel,									"EVdpInvalidLevel");
       
   266 _LIT(KVdpNotSupportedLevel,								"EVdpNotSupportedLevel");
       
   267 _LIT(KVdpInvalidCPType,									"EVdpInvalidCPType");
       
   268 _LIT(KVdpInvalidCPFormat,								"EVdpInvalidCPFormat");
       
   269 
       
   270 //TBluetoothMediaType
       
   271 _LIT(KAvdtpMediaTypeAudio,								"EAvdtpMediaTypeAudio");
       
   272 _LIT(KAvdtpMediaTypeVideo,								"EAvdtpMediaTypeVideo");
       
   273 _LIT(KAvdtpMediaTypeMultimedia,							"EAvdtpMediaTypeMultimedia");
       
   274 
       
   275 //TAvdtpTransportSessionType
       
   276 _LIT(KMedia,											"EMedia");
       
   277 _LIT(KReporting,										"EReporting");
       
   278 _LIT(KRecovery,											"ERecovery");
       
   279 _LIT(KSignalling,										"ESignalling");
       
   280 _LIT(KNumStreamTypes,									"ENumStreamTypes");
       
   281 /*@}*/
       
   282 
       
   283 void CT_BTUtil::GetChannelPriority(CDataWrapper& aDataWrapper, TL2CapConfig::TChannelPriority& aType, const TDesC& aSection, const TDesC& aField)
       
   284 	{
       
   285 	TPtrC	typeName;		
       
   286 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   287 	if ( ret )
       
   288 		{
       
   289 		if (typeName == KEHigh)
       
   290 			{
       
   291 			aType = TL2CapConfig::EHigh;
       
   292 			}
       
   293 		else if (typeName == KEMedium)
       
   294 			{
       
   295 			aType = TL2CapConfig::EMedium;
       
   296 			}
       
   297 		else if (typeName == KELow)
       
   298 			{
       
   299 			aType = TL2CapConfig::ELow;
       
   300 			}	
       
   301 		else 
       
   302 			{
       
   303 			TInt	intType;
       
   304 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   305 				{
       
   306 				aType = (TL2CapConfig::TChannelPriority) intType;
       
   307 				}
       
   308 			else
       
   309 				{
       
   310 				aDataWrapper.ERR_PRINTF2(_L("Illegal TL2CapConfig::TChannelPriority %S"), &aField);
       
   311 				aDataWrapper.SetBlockResult(EFail);
       
   312 				}
       
   313 			}
       
   314 		}
       
   315 	}
       
   316 
       
   317 void CT_BTUtil::GetChannel(CDataWrapper& aDataWrapper, TL2CapConfig::TChannelReliability& aType, const TDesC& aSection, const TDesC& aField)
       
   318 	{
       
   319 	TPtrC	typeName;		
       
   320 	
       
   321 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   322 	if ( ret )
       
   323 		{
       
   324 		if (typeName == KEReliableChannel)
       
   325 			{
       
   326 			aType = TL2CapConfig::EReliableChannel;
       
   327 			}
       
   328 		else if (typeName == KEUnreliableChannel)
       
   329 			{
       
   330 			aType = TL2CapConfig::EUnreliableChannel;
       
   331 			}
       
   332 		else 
       
   333 			{
       
   334 			TInt	intType;
       
   335 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   336 				{
       
   337 				aType = (TL2CapConfig::TChannelReliability) intType;
       
   338 				}
       
   339 			else
       
   340 				{
       
   341 				aDataWrapper.ERR_PRINTF2(_L("Illegal TL2CapConfig::TChannelReliability %S"), &aField);
       
   342 				aDataWrapper.SetBlockResult(EFail);
       
   343 				}
       
   344 			}
       
   345 		}
       
   346 	}
       
   347 
       
   348 void CT_BTUtil::GetBitValue(CDataWrapper& aDataWrapper, TBps& aType, const TDesC& aSection, const TDesC& aField)
       
   349 	{
       
   350 	TPtrC	typeName;		
       
   351 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   352 	if ( ret )
       
   353 		{
       
   354 		if (typeName == KEBps50)
       
   355 			{
       
   356 			aType = EBps50;
       
   357 			}
       
   358 		else if (typeName == KEBps75)
       
   359 			{
       
   360 			aType = EBps75;
       
   361 			}
       
   362 		else if (typeName == KEBps110)
       
   363 			{
       
   364 			aType = EBps110;
       
   365 			}
       
   366 		else if (typeName == KEBps134)
       
   367 			{
       
   368 			aType = EBps134;
       
   369 			}
       
   370 		else if (typeName == KEBps150)
       
   371 			{
       
   372 			aType = EBps150;
       
   373 			}
       
   374 		else if (typeName == KEBps300)
       
   375 			{
       
   376 			aType = EBps300;
       
   377 			}
       
   378 		else if (typeName == KEBps600)
       
   379 			{
       
   380 			aType = EBps600;
       
   381 			}
       
   382 		else if (typeName == KEBps1200)
       
   383 			{
       
   384 			aType = EBps1200;
       
   385 			}
       
   386 		else if (typeName == KEBps1800)
       
   387 			{
       
   388 			aType = EBps1800;
       
   389 			}
       
   390 		else if (typeName == KEBps2000)
       
   391 			{
       
   392 			aType = EBps2000;
       
   393 			}
       
   394 		else if (typeName == KEBps2400)
       
   395 			{
       
   396 			aType = EBps2400;
       
   397 			}
       
   398 		else if (typeName == KEBps3600)
       
   399 			{
       
   400 			aType = EBps3600;
       
   401 			}
       
   402 		else if (typeName == KEBps4800)
       
   403 			{
       
   404 			aType = EBps4800;
       
   405 			}
       
   406 		else if (typeName == KEBps7200)
       
   407 			{
       
   408 			aType = EBps7200;
       
   409 			}
       
   410 		else if (typeName == KEBps9600)
       
   411 			{
       
   412 			aType = EBps9600;
       
   413 			}
       
   414 		else if (typeName == KEBps19200)
       
   415 			{
       
   416 			aType = EBps19200;
       
   417 			}
       
   418 		else if (typeName == KEBps38400)
       
   419 			{
       
   420 			aType = EBps38400;
       
   421 			}
       
   422 		else if (typeName == KEBps57600)
       
   423 			{
       
   424 			aType = EBps57600;
       
   425 			}
       
   426 		else if (typeName == KEBps115200)
       
   427 			{
       
   428 			aType = EBps115200;
       
   429 			}
       
   430 		else if (typeName == KEBps230400)
       
   431 			{
       
   432 			aType = EBps230400;
       
   433 			}
       
   434 		else if (typeName == KEBps460800)
       
   435 			{
       
   436 			aType = EBps460800;
       
   437 			}
       
   438 		else if (typeName == KEBps576000)
       
   439 			{
       
   440 			aType = EBps576000;
       
   441 			}
       
   442 		else if (typeName == KEBps1152000)
       
   443 			{
       
   444 			aType = EBps1152000;
       
   445 			}
       
   446 		else if (typeName == KEBps4000000)
       
   447 			{
       
   448 			aType = EBps4000000;
       
   449 			}
       
   450 		else if (typeName == KEBps921600)
       
   451 			{
       
   452 			aType = EBps921600;
       
   453 			}
       
   454 		else if (typeName == KEBpsAutobaud)
       
   455 			{
       
   456 			aType = EBpsAutobaud;
       
   457 			}
       
   458 		else if (typeName == KEBpsSpecial)
       
   459 			{
       
   460 			aType = EBpsSpecial;
       
   461 			}
       
   462 		else 
       
   463 			{
       
   464 			TInt	intType;
       
   465 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   466 				{
       
   467 				aType = (TBps) intType;
       
   468 				}
       
   469 			else
       
   470 				{
       
   471 				aDataWrapper.ERR_PRINTF2(_L("Illegal TBps %S"), &aField);
       
   472 				aDataWrapper.SetBlockResult(EFail);
       
   473 				}
       
   474 			}
       
   475 		}
       
   476 	}
       
   477 
       
   478 void CT_BTUtil::GetDataBits(CDataWrapper& aDataWrapper, TDataBits& aType, const TDesC& aSection, const TDesC& aField)
       
   479 	{
       
   480 	TPtrC	typeName;		
       
   481 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   482 	if ( ret )
       
   483 		{
       
   484 		if (typeName == KEData5)
       
   485 			{
       
   486 			aType = EData5;
       
   487 			}
       
   488 		else if (typeName == KEData6)
       
   489 			{
       
   490 			aType = EData6;
       
   491 			}
       
   492 		else if (typeName == KEData7)
       
   493 			{
       
   494 			aType = EData7;
       
   495 			}
       
   496 		else if (typeName == KEData8)
       
   497 			{
       
   498 			aType = EData8;
       
   499 			}
       
   500 		else 
       
   501 			{
       
   502 			TInt	intType;
       
   503 			ret = aDataWrapper.GetIntFromConfig(aSection, aField, intType); 
       
   504 			if ( ret )
       
   505 				{
       
   506 				aType = (TDataBits) intType;
       
   507 				}
       
   508 			else
       
   509 				{
       
   510 				aDataWrapper.ERR_PRINTF2(_L("Illegal TDataBits %S"), &aField);
       
   511 				aDataWrapper.SetBlockResult(EFail);
       
   512 				}
       
   513 			}
       
   514 		}
       
   515 	}
       
   516 
       
   517 void CT_BTUtil::GetParity(CDataWrapper& aDataWrapper, TParity& aType, const TDesC& aSection, const TDesC& aField)
       
   518 	{
       
   519 	TPtrC	typeName;		
       
   520 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   521 	if ( ret )
       
   522 		{
       
   523 		if (typeName == KEParityNone)
       
   524 			{
       
   525 			aType = EParityNone;
       
   526 			}
       
   527 		else if (typeName == KEParityEven)
       
   528 			{
       
   529 			aType = EParityEven;
       
   530 			}
       
   531 		else if (typeName == KEParityOdd)
       
   532 			{
       
   533 			aType = EParityOdd;
       
   534 			}
       
   535 		else if (typeName == KEParityMark)
       
   536 			{
       
   537 			aType = EParityMark;
       
   538 			}
       
   539 		else if (typeName == KEParitySpace)
       
   540 			{
       
   541 			aType = EParitySpace;
       
   542 			}
       
   543 		else 
       
   544 			{
       
   545 			TInt	intType;
       
   546 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   547 				{
       
   548 				aType = (TParity) intType;
       
   549 				}
       
   550 			else
       
   551 				{
       
   552 				aDataWrapper.ERR_PRINTF2(_L("Illegal TParity %S"), &aField);
       
   553 				aDataWrapper.SetBlockResult(EFail);
       
   554 				}
       
   555 			}
       
   556 		}
       
   557 	}
       
   558 
       
   559 void CT_BTUtil::GetStopBits(CDataWrapper& aDataWrapper, TStopBits& aType, const TDesC& aSection, const TDesC& aField)
       
   560 	{
       
   561 	TPtrC	typeName;		
       
   562 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   563 	if ( ret )
       
   564 		{
       
   565 		if (typeName == KEStop1)
       
   566 			{
       
   567 			aType = EStop1;
       
   568 			}
       
   569 		else if (typeName == KEStop2)
       
   570 			{
       
   571 			aType = EStop2;
       
   572 			}
       
   573 		else 
       
   574 			{
       
   575 			TInt	intType;
       
   576 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   577 				{
       
   578 				aType = (TStopBits) intType;
       
   579 				}
       
   580 			else
       
   581 				{
       
   582 				aDataWrapper.ERR_PRINTF2(_L("Illegal TStopBits %S"), &aField);
       
   583 				aDataWrapper.SetBlockResult(EFail);
       
   584 				}
       
   585 			}
       
   586 		}
       
   587 	}
       
   588 
       
   589 void CT_BTUtil::GetTRPNFlowCtrlMask(CDataWrapper& aDataWrapper, TRPNFlowCtrlMask& aType, const TDesC& aSection, const TDesC& aField)
       
   590 	{
       
   591 	TPtrC	typeName;		
       
   592 	TBool ret=aDataWrapper.GetStringFromConfig(aSection, aField, typeName);
       
   593 	if ( ret )
       
   594 		{
       
   595 		if (typeName == KEFCXOnOffInput)
       
   596 			{
       
   597 			aType = EFCXOnOffInput;
       
   598 			}
       
   599 		else if (typeName == KEFCXOnOffOutput)
       
   600 			{
       
   601 			aType = EFCXOnOffOutput;
       
   602 			}
       
   603 		else if (typeName == KEFCRTRInput)
       
   604 			{
       
   605 			aType = EFCRTRInput;
       
   606 			}
       
   607 		else if (typeName == KEFCRTROutput)
       
   608 			{
       
   609 			aType = EFCRTROutput;
       
   610 			}
       
   611 		else if (typeName == KEFCRTCInput)
       
   612 			{
       
   613 			aType = EFCRTCInput;
       
   614 			}
       
   615 		else if (typeName == KEFCRTCOutput)
       
   616 			{
       
   617 			aType = EFCRTCOutput;
       
   618 			}
       
   619 		else
       
   620 			{
       
   621 			TInt	intType;
       
   622 			if ( aDataWrapper.GetIntFromConfig(aSection, aField, intType) )
       
   623 				{
       
   624 				aType = (TRPNFlowCtrlMask) intType;
       
   625 				}
       
   626 			else
       
   627 				{
       
   628 				aDataWrapper.ERR_PRINTF2(_L("Illegal TRPNFlowCtrlMask mask %S"), &aField);
       
   629 				aDataWrapper.SetBlockResult(EFail);
       
   630 				}
       
   631 			}
       
   632 		}
       
   633 	}
       
   634 
       
   635 
       
   636 TBool CT_BTUtil::GetPacketTypeIntValue(TPtrC packetTypeName, TInt& aValue)
       
   637 	{
       
   638 	TBool	ret	= ETrue;
       
   639 	//TBTPacketType
       
   640 	if ( packetTypeName==KEPacketsDM1 )
       
   641 		{
       
   642 		aValue=EPacketsDM1;
       
   643 		}
       
   644 	else if ( packetTypeName==KEPacketsDH1 )
       
   645 		{
       
   646 		aValue=EPacketsDH1;
       
   647 		}
       
   648 	else if ( packetTypeName==KEPacketsDM3 )
       
   649 		{
       
   650 		aValue=EPacketsDM3;
       
   651 		}
       
   652 	else if ( packetTypeName==KEPacketsDH3 )
       
   653 		{
       
   654 		aValue=EPacketsDH3;
       
   655 		}
       
   656 	else if ( packetTypeName==KEPacketsDM5 )
       
   657 		{
       
   658 		aValue=EPacketsDM5;
       
   659 		}
       
   660 	else if ( packetTypeName==KEPacketsDH5 )
       
   661 		{
       
   662 		aValue=EPacketsDH5;
       
   663 		}
       
   664 	else if ( packetTypeName==KEPackets2_DH1 )
       
   665 		{
       
   666 		aValue=EPackets2_DH1;
       
   667 		}
       
   668 	else if ( packetTypeName==KEPackets3_DH1 )
       
   669 		{
       
   670 		aValue=EPackets3_DH1;
       
   671 		}
       
   672 	else if ( packetTypeName==KEPackets2_DH3 )
       
   673 		{
       
   674 		aValue=EPackets2_DH3;
       
   675 		}
       
   676 	else if ( packetTypeName==KEPackets3_DH3 )
       
   677 		{
       
   678 		aValue=EPackets3_DH3;
       
   679 		}
       
   680 	else if ( packetTypeName==KEPackets2_DH5 )
       
   681 		{
       
   682 		aValue=EPackets2_DH5;
       
   683 		}
       
   684 	else if ( packetTypeName==KEPackets3_DH5 )
       
   685 		{
       
   686 		aValue=EPackets3_DH5;
       
   687 		}
       
   688 	else if ( packetTypeName==KEPacketsHV1 )
       
   689 		{
       
   690 		aValue=EPacketsHV1;
       
   691 		}
       
   692 	else if ( packetTypeName==KEPacketsHV2 )
       
   693 		{
       
   694 		aValue=EPacketsHV2;
       
   695 		}
       
   696 	else if ( packetTypeName==KEPacketsHV3 )
       
   697 		{
       
   698 		aValue=EPacketsHV3;
       
   699 		}
       
   700 	//TBTPacketTypeCombinations
       
   701 	else if ( packetTypeName==KEAnyACLPacket )
       
   702 		{
       
   703 		aValue=EAnyACLPacket;
       
   704 		}
       
   705 	else if ( packetTypeName==KEAnySCOPacket )
       
   706 		{
       
   707 		aValue=EAnySCOPacket;
       
   708 		}
       
   709 	else if ( packetTypeName==KEAnyPacket )
       
   710 		{
       
   711 		aValue=EAnyPacket;
       
   712 		}
       
   713 	//ESCO packet type
       
   714 	else if ( packetTypeName==KESyncPacketsEV3 )
       
   715 		{
       
   716 		aValue=TBTSyncPackets::ESyncPacketsEV3;
       
   717 		}
       
   718 	else if ( packetTypeName==KESyncPacketsEV4 )
       
   719 		{
       
   720 		aValue=TBTSyncPackets::ESyncPacketsEV4;
       
   721 		}
       
   722 	else if ( packetTypeName==KESyncPacketsEV5 )
       
   723 		{
       
   724 		aValue=TBTSyncPackets::ESyncPacketsEV5;
       
   725 		}
       
   726 	else if ( packetTypeName==KESyncAnyESCOPacket )
       
   727 		{
       
   728 		aValue=TBTSyncPackets::ESyncAnyESCOPacket;
       
   729 		}
       
   730 	else
       
   731 		{
       
   732 		ret=EFalse;
       
   733 		aValue=-1;
       
   734 		}
       
   735 	
       
   736 	return ret;
       
   737 	}
       
   738 
       
   739 
       
   740 TBool CT_BTUtil::ReadTBTSyncPackets(CDataWrapper& aDataWrapper, TBTSyncPackets::TSyncPackets& aSyncPacket, const TDesC& aSection, const TDesC& aField)
       
   741 	{
       
   742 	TPtrC	syncPacket;
       
   743 	TBool	ret=aDataWrapper.GetStringFromConfig(aSection, aField, syncPacket);
       
   744 	if ( ret )
       
   745 		{
       
   746 		if ( syncPacket==KESyncPacketsHV1 )
       
   747 			{
       
   748 			aSyncPacket=TBTSyncPackets::ESyncPacketsHV1;
       
   749 			}
       
   750 		else if ( syncPacket==KESyncPacketsHV2 )
       
   751 			{
       
   752 			aSyncPacket=TBTSyncPackets::ESyncPacketsHV2;
       
   753 			}
       
   754 		else if ( syncPacket==KESyncPacketsHV3 )
       
   755 			{
       
   756 			aSyncPacket=TBTSyncPackets::ESyncPacketsHV3;
       
   757 			}
       
   758 		else if ( syncPacket==KESyncPacketsEV3 )
       
   759 			{
       
   760 			aSyncPacket=TBTSyncPackets::ESyncPacketsEV3;
       
   761 			}
       
   762 		else if ( syncPacket==KESyncPacketsEV4 )
       
   763 			{
       
   764 			aSyncPacket=TBTSyncPackets::ESyncPacketsEV4;
       
   765 			}
       
   766 		else if ( syncPacket==KESyncPacketsEV5 )
       
   767 			{
       
   768 			aSyncPacket=TBTSyncPackets::ESyncPacketsEV5;
       
   769 			}
       
   770 		else if ( syncPacket==KESyncAnySCOPacket )
       
   771 			{
       
   772 			aSyncPacket=TBTSyncPackets::ESyncAnySCOPacket;
       
   773 			}
       
   774 		else if ( syncPacket==KESyncAnyESCOPacket )
       
   775 			{
       
   776 			aSyncPacket=TBTSyncPackets::ESyncAnyESCOPacket;
       
   777 			}
       
   778 		else
       
   779 			{
       
   780 			TInt	intType;
       
   781 			ret=aDataWrapper.GetIntFromConfig(aSection, aField, intType);
       
   782 			if ( ret )
       
   783 				{
       
   784 				aSyncPacket=(TBTSyncPackets::TSyncPackets)intType;
       
   785 				}
       
   786 			else
       
   787 				{
       
   788 				aDataWrapper.ERR_PRINTF1(_L("Unknow input for TBTSyncPackets"));
       
   789 				aDataWrapper.SetBlockResult(EFail);
       
   790 				}
       
   791 			}
       
   792 		}
       
   793 	return ret;
       
   794 	}
       
   795 
       
   796 
       
   797 TBool CT_BTUtil::ReadTBTeSCORetransmissionTypes(CDataWrapper& aDataWrapper, TBTeSCORetransmissionTypes& aRetransmissionType, const TDesC& aSection, const TDesC& aField)
       
   798 	{
       
   799 	TPtrC	retransmissionType;
       
   800 	TBool	ret=aDataWrapper.GetStringFromConfig(aSection, aField, retransmissionType);
       
   801 	if ( ret )
       
   802 		{
       
   803 		if ( retransmissionType==KEeSCORetransmitNone )
       
   804 			{
       
   805 			aRetransmissionType=EeSCORetransmitNone;
       
   806 			}
       
   807 		else if ( retransmissionType==KEeSCORetransmitPower )
       
   808 			{
       
   809 			aRetransmissionType=EeSCORetransmitPower;
       
   810 			}
       
   811 		else if ( retransmissionType==KEeSCORetransmitReliability )
       
   812 			{
       
   813 			aRetransmissionType=EeSCORetransmitReliability;
       
   814 			}
       
   815 		else if ( retransmissionType==KEeSCORetransmitDontCare )
       
   816 			{
       
   817 			aRetransmissionType=EeSCORetransmitDontCare;
       
   818 			}
       
   819 		else
       
   820 			{
       
   821 			TInt	intType;
       
   822 			ret=aDataWrapper.GetIntFromConfig(aSection, aField, intType);
       
   823 			if ( ret )
       
   824 				{
       
   825 				aRetransmissionType=(TBTeSCORetransmissionTypes)intType;
       
   826 				}
       
   827 			else
       
   828 				{
       
   829 				aDataWrapper.ERR_PRINTF1(_L("Unknow input for TBTeSCORetransmissionTypes"));
       
   830 				aDataWrapper.SetBlockResult(EFail);
       
   831 				}
       
   832 			}
       
   833 		}
       
   834 	return ret;
       
   835 	}
       
   836 
       
   837 
       
   838 TBool CT_BTUtil::GetLowPowerModeIntValue(TPtrC lowPowerModeName, TInt& aValue)
       
   839 	{
       
   840 	TBool	ret	= ETrue;
       
   841 	if (lowPowerModeName == KLowPowerHoldMode)
       
   842 		{
       
   843 		aValue = EHoldMode;
       
   844 		}
       
   845 	else if (lowPowerModeName == KLowPowerSniffMode)
       
   846 		{
       
   847 		aValue = ESniffMode;
       
   848 		}
       
   849 	else if (lowPowerModeName == KLowPowerParkMode)
       
   850 		{
       
   851 		aValue = EParkMode;
       
   852 		}
       
   853 	else if (lowPowerModeName == KLowPowerAnyLowPowerMode)
       
   854 		{
       
   855 		aValue = EAnyLowPowerMode;
       
   856 		}
       
   857 	else
       
   858 		{
       
   859 		ret=EFalse;
       
   860 		aValue=-1;
       
   861 		}
       
   862 	
       
   863 	return ret;
       
   864 	}
       
   865 
       
   866 
       
   867 TBool CT_BTUtil::GetPhysicalLinkStateIntValue(TPtrC physicalLinkStateName, TInt& aValue)
       
   868 	{
       
   869 	TBool	ret	= ETrue;
       
   870 	//TBTPhysicalLinkStateNotifier
       
   871 	if (physicalLinkStateName == KENotifyMaster)
       
   872 		{
       
   873 		aValue = ENotifyMaster;
       
   874 		}
       
   875 	else if (physicalLinkStateName == KENotifySlave)
       
   876 		{
       
   877 		aValue = ENotifySlave;
       
   878 		}
       
   879 	else if (physicalLinkStateName == KENotifyActiveMode)
       
   880 		{
       
   881 		aValue = ENotifyActiveMode;
       
   882 		}
       
   883 	else if (physicalLinkStateName == KENotifySniffMode)
       
   884 		{
       
   885 		aValue = ENotifySniffMode;
       
   886 		}
       
   887 	else if (physicalLinkStateName == KENotifyParkMode)
       
   888 		{
       
   889 		aValue = ENotifyParkMode;
       
   890 		}
       
   891 	else if (physicalLinkStateName == KENotifyHoldMode)
       
   892 		{
       
   893 		aValue = ENotifyHoldMode;
       
   894 		}
       
   895 	else if (physicalLinkStateName == KENotifyMaxSlots1)
       
   896 		{
       
   897 		aValue = ENotifyMaxSlots1;
       
   898 		}
       
   899 	else if (physicalLinkStateName == KENotifyMaxSlots3)
       
   900 		{
       
   901 		aValue = ENotifyMaxSlots3;
       
   902 		}
       
   903 	else if (physicalLinkStateName == KENotifyMaxSlots5)
       
   904 		{
       
   905 		aValue = ENotifyMaxSlots5;
       
   906 		}
       
   907 	else if (physicalLinkStateName == KENotifyPacketsDM1)
       
   908 		{
       
   909 		aValue = ENotifyPacketsDM1;
       
   910 		}
       
   911 	else if (physicalLinkStateName == KENotifyPacketsDH1)
       
   912 		{
       
   913 		aValue = ENotifyPacketsDH1;
       
   914 		}
       
   915 	else if (physicalLinkStateName == KENotifyPacketsDM3)
       
   916 		{
       
   917 		aValue = ENotifyPacketsDM3;
       
   918 		}
       
   919 	else if (physicalLinkStateName == KENotifyPacketsDH3)
       
   920 		{
       
   921 		aValue = ENotifyPacketsDH3;
       
   922 		}
       
   923 	else if (physicalLinkStateName == KENotifyPacketsDM5)
       
   924 		{
       
   925 		aValue = ENotifyPacketsDM5;
       
   926 		}
       
   927 	else if (physicalLinkStateName == KENotifyPacketsDH5)
       
   928 		{
       
   929 		aValue = ENotifyPacketsDH5;
       
   930 		}
       
   931 	else if (physicalLinkStateName == KENotifyPacketsHV1)
       
   932 		{
       
   933 		aValue = ENotifyPacketsHV1;
       
   934 		}
       
   935 	else if (physicalLinkStateName == KENotifyPacketsHV2)
       
   936 		{
       
   937 		aValue = ENotifyPacketsHV2;
       
   938 		}
       
   939 	else if (physicalLinkStateName == KENotifyPacketsHV3)
       
   940 		{
       
   941 		aValue = ENotifyPacketsHV3;
       
   942 		}
       
   943 	else if (physicalLinkStateName == KENotifyAuthenticationComplete)
       
   944 		{
       
   945 		aValue = ENotifyAuthenticationComplete;
       
   946 		}
       
   947 	else if (physicalLinkStateName == KENotifyEncryptionChangeOn)
       
   948 		{
       
   949 		aValue = ENotifyEncryptionChangeOn;
       
   950 		}
       
   951 	else if (physicalLinkStateName == KENotifyEncryptionChangeOff)
       
   952 		{
       
   953 		aValue = ENotifyEncryptionChangeOff;
       
   954 		}
       
   955 	else if (physicalLinkStateName == KENotifyPhysicalLinkUp)
       
   956 		{
       
   957 		aValue = ENotifyPhysicalLinkUp;
       
   958 		}
       
   959 	else if (physicalLinkStateName == KENotifyPhysicalLinkDown)
       
   960 		{
       
   961 		aValue = ENotifyPhysicalLinkDown;
       
   962 		}
       
   963 	else if (physicalLinkStateName == KENotifyPhysicalLinkError)
       
   964 		{
       
   965 		aValue = ENotifyPhysicalLinkError;
       
   966 		}
       
   967 	else if (physicalLinkStateName == KENotifySynchronousLinkUp)
       
   968 		{
       
   969 		aValue = ENotifySynchronousLinkUp;
       
   970 		}
       
   971 	else if (physicalLinkStateName == KENotifySynchronousLinkDown)
       
   972 		{
       
   973 		aValue = ENotifySynchronousLinkDown;
       
   974 		}
       
   975 	else if (physicalLinkStateName == KENotifySynchronousLinkError)
       
   976 		{
       
   977 		aValue = ENotifySynchronousLinkError;
       
   978 		}
       
   979 	else if (physicalLinkStateName == KENotifySCOLinkUp)
       
   980 		{
       
   981 		aValue = ENotifySCOLinkUp;
       
   982 		}
       
   983 	else if (physicalLinkStateName == KENotifySCOLinkDown)
       
   984 		{
       
   985 		aValue = ENotifySCOLinkDown;
       
   986 		}
       
   987 	else if (physicalLinkStateName == KENotifySCOLinkError)
       
   988 		{
       
   989 		aValue = ENotifySCOLinkError;
       
   990 		}
       
   991 	//TBTPhysicalLinkStateNotifierCombinations
       
   992 	else if (physicalLinkStateName == KENotifyAnyRole)
       
   993 		{
       
   994 		aValue = ENotifyAnyRole;
       
   995 		}
       
   996 	else if (physicalLinkStateName == KENotifyAnyLowPowerMode)
       
   997 		{
       
   998 		aValue = ENotifyAnyLowPowerMode;
       
   999 		}
       
  1000 	else if (physicalLinkStateName == KENotifyAnyPowerMode)
       
  1001 		{
       
  1002 		aValue = ENotifyAnyPowerMode;
       
  1003 		}
       
  1004 	else if (physicalLinkStateName == KENotifyAnyMaxSlots)
       
  1005 		{
       
  1006 		aValue = ENotifyAnyMaxSlots;
       
  1007 		}
       
  1008 	else if (physicalLinkStateName == KENotifyAnyACLPacketType)
       
  1009 		{
       
  1010 		aValue = ENotifyAnyACLPacketType;
       
  1011 		}
       
  1012 	else if (physicalLinkStateName == KENotifyAnySCOPacketType)
       
  1013 		{
       
  1014 		aValue = ENotifyAnySCOPacketType;
       
  1015 		}
       
  1016 	else if (physicalLinkStateName == KENotifyAnyPacketType)
       
  1017 		{
       
  1018 		aValue = ENotifyAnyPacketType;
       
  1019 		}
       
  1020 	else if (physicalLinkStateName == KENotifyAnyPhysicalLinkState)
       
  1021 		{
       
  1022 		aValue = ENotifyAnyPhysicalLinkState;
       
  1023 		}
       
  1024 	else
       
  1025 		{
       
  1026 		ret=EFalse;
       
  1027 		aValue=-1;
       
  1028 		}
       
  1029 	
       
  1030 	return ret;
       
  1031 	}
       
  1032 
       
  1033 TBool CT_BTUtil::ReadSdpElementType(CDataWrapper& aDataWrapper, TSdpElementType& aType, const TDesC& aSection, const TDesC& aField)
       
  1034 	{
       
  1035 	TPtrC	type;
       
  1036 	TBool	ret=aDataWrapper.GetStringFromConfig(aSection, aField, type);
       
  1037 	if ( ret )
       
  1038 		{
       
  1039 		if ( type==KSdpElementTypeNil )
       
  1040 			{
       
  1041 			aType=ETypeNil;
       
  1042 			}
       
  1043 		else if ( type==KSdpElementTypeUint )
       
  1044 			{
       
  1045 			aType=ETypeUint;
       
  1046 			}
       
  1047 		else if ( type==KSdpElementTypeInt )
       
  1048 			{
       
  1049 			aType=ETypeInt;
       
  1050 			}
       
  1051 		else if ( type==KSdpElementTypeUUID )
       
  1052 			{
       
  1053 			aType=ETypeUUID;
       
  1054 			}
       
  1055 		else if ( type==KSdpElementTypeString )
       
  1056 			{
       
  1057 			aType=ETypeString;
       
  1058 			}
       
  1059 		else if ( type==KSdpElementTypeBoolean )
       
  1060 			{
       
  1061 			aType=ETypeBoolean;
       
  1062 			}
       
  1063 		else if ( type==KSdpElementTypeDES )
       
  1064 			{
       
  1065 			aType=ETypeDES;
       
  1066 			}
       
  1067 		else if ( type==KSdpElementTypeDEA )
       
  1068 			{
       
  1069 			aType=ETypeDEA;
       
  1070 			}
       
  1071 		else if ( type==KSdpElementTypeURL )
       
  1072 			{
       
  1073 			aType=ETypeURL;
       
  1074 			}
       
  1075 		else if ( type==KSdpElementTypeEncoded )
       
  1076 			{
       
  1077 			aType=ETypeEncoded;
       
  1078 			}
       
  1079 		else
       
  1080 			{
       
  1081 			TInt	intType;
       
  1082 			ret=aDataWrapper.GetIntFromConfig(aSection, aField, intType);
       
  1083 			if ( ret )
       
  1084 				{
       
  1085 				aType=(TSdpElementType)intType;
       
  1086 				}
       
  1087 			else
       
  1088 				{
       
  1089 				aDataWrapper.ERR_PRINTF1(_L("Unknow input for TSdpElementType"));
       
  1090 				aDataWrapper.SetBlockResult(EFail);
       
  1091 				}
       
  1092 			}
       
  1093 		}
       
  1094 
       
  1095 	return ret;
       
  1096 	}
       
  1097 
       
  1098 MSdpElementBuilder* CT_BTUtil::ElementBuilderCastL(CDataWrapper& aDataWrapper, const TDesC& aObjectName, const TDesC& aTypeName)
       
  1099 	{
       
  1100 	MSdpElementBuilder*	ret = NULL;
       
  1101 	TAny*				object=aDataWrapper.GetDataObjectL(aObjectName);
       
  1102 
       
  1103 	if( aTypeName == KCSdpAttrValueDES )
       
  1104 		{
       
  1105 		ret = static_cast<CSdpAttrValueDES*>(object);
       
  1106 		}
       
  1107 	else if( aTypeName == KCSdpAttrValueDEA )
       
  1108 		{
       
  1109 		ret = static_cast<CSdpAttrValueDEA*>(object);
       
  1110 		}
       
  1111 	else if( aTypeName == KCSdpAttrValueList )
       
  1112 		{
       
  1113 		ret = static_cast<CSdpAttrValueList*>(object);
       
  1114 		}
       
  1115 	else
       
  1116 		{
       
  1117 		aDataWrapper.ERR_PRINTF2(_L("Unknow Type %S for ElementBuilderCastL call"), &aTypeName);
       
  1118 		aDataWrapper.SetBlockResult(EFail);
       
  1119 		}
       
  1120 
       
  1121 	return ret;
       
  1122 	}
       
  1123 
       
  1124 CSdpAttrValueList* CT_BTUtil::AttrValueListCastL(CDataWrapper& aDataWrapper, const TDesC& aObjectName, const TDesC& aTypeName)
       
  1125 	{
       
  1126 	CSdpAttrValueList*	ret = NULL;
       
  1127 	TAny*				object=aDataWrapper.GetDataObjectL(aObjectName);
       
  1128 
       
  1129 	if( aTypeName == KCSdpAttrValueDES )
       
  1130 		{
       
  1131 		ret = static_cast<CSdpAttrValueDES*>(object);
       
  1132 		}
       
  1133 	else if( aTypeName == KCSdpAttrValueDEA )
       
  1134 		{
       
  1135 		ret = static_cast<CSdpAttrValueDEA*>(object);
       
  1136 		}
       
  1137 	else if( aTypeName == KCSdpAttrValueList )
       
  1138 		{
       
  1139 		ret = static_cast<CSdpAttrValueList*>(object);
       
  1140 		}
       
  1141 	else
       
  1142 		{
       
  1143 		aDataWrapper.ERR_PRINTF2(_L("Unknow Type %S for AttrValueListCastL call"), &aTypeName);
       
  1144 		aDataWrapper.SetBlockResult(EFail);
       
  1145 		}
       
  1146 
       
  1147 	return ret;
       
  1148 	}
       
  1149 
       
  1150 TUint CT_BTUtil::ConvertUUID32toInt(const TUUID& aUUID)
       
  1151 	{
       
  1152 	TUint	result = aUUID[3] + 256*(aUUID[2] + 256*(aUUID[1] + aUUID[0]*256));
       
  1153 
       
  1154 	return result;
       
  1155 	}
       
  1156 
       
  1157 void CT_BTUtil::GetLowPowerMode(CDataWrapper& aDataWrapper, const TDesC& aSection, TUint32& aModes)
       
  1158 	{
       
  1159 	TBuf<KMaxTestExecuteCommandLength>	tempStore;
       
  1160 
       
  1161 	aModes=0;
       
  1162 	TBool	moreData=ETrue;
       
  1163 	TInt	index=0;
       
  1164 	while ( moreData )
       
  1165 		{
       
  1166 		TPtrC	modeName;
       
  1167 		tempStore.Format(KLowPowerMode(), ++index);
       
  1168 
       
  1169 		moreData=aDataWrapper.GetStringFromConfig(aSection, tempStore, modeName);
       
  1170 		if ( moreData )
       
  1171 			{
       
  1172 			if (modeName == KLowPowerActiveMode)
       
  1173 				{
       
  1174 				aModes |= EActiveMode;
       
  1175 				}
       
  1176 			else if (modeName == KLowPowerHoldMode)
       
  1177 				{
       
  1178 				aModes |= EHoldMode;
       
  1179 				}
       
  1180 			else if (modeName == KLowPowerSniffMode)
       
  1181 				{
       
  1182 				aModes |= ESniffMode;
       
  1183 				}
       
  1184 			else if (modeName == KLowPowerParkMode)
       
  1185 				{
       
  1186 				aModes |= EParkMode;
       
  1187 				}
       
  1188 			else if (modeName == KLowPowerScatterMode)
       
  1189 				{
       
  1190 				aModes |= EScatterMode;
       
  1191 				}
       
  1192 			else if (modeName == KLowPowerAnyLowPowerMode)
       
  1193 				{
       
  1194 				aModes |= EAnyLowPowerMode;
       
  1195 				}
       
  1196 			else
       
  1197 				{
       
  1198 				TInt	intMode;
       
  1199 				if ( aDataWrapper.GetIntFromConfig(aSection, tempStore, intMode) )
       
  1200 					{
       
  1201 					aModes |= intMode;
       
  1202 					}
       
  1203 				else
       
  1204 					{
       
  1205 					aDataWrapper.ERR_PRINTF2(_L("Illegal mode %S"), &tempStore);
       
  1206 					aDataWrapper.SetBlockResult(EFail);
       
  1207 					}
       
  1208 				}
       
  1209 			}
       
  1210 		else if (index==1)
       
  1211 			{
       
  1212 			//Special case as we would want to use default if not found at all
       
  1213 			aModes=EAnyLowPowerMode;
       
  1214 			}
       
  1215 		}
       
  1216 	}
       
  1217 
       
  1218 TBool CT_BTUtil::GetShutdown(CDataWrapper& aDataWrapper, const TDesC& aSection, RSocket::TShutdown& aShutdown)
       
  1219 	{
       
  1220 
       
  1221 	TPtrC	shutdownMethod;
       
  1222 	TBool	ret=aDataWrapper.GetStringFromConfig(aSection, KShutdownMethod(), shutdownMethod);
       
  1223 	if ( ret )
       
  1224 		{
       
  1225 		if (shutdownMethod == KShutdownNormal)
       
  1226 			{
       
  1227 			aShutdown = RSocket::ENormal;
       
  1228 			}
       
  1229 		else if (shutdownMethod == KShutdownStopInput)
       
  1230 			{
       
  1231 			aShutdown = RSocket::EStopInput;
       
  1232 			}
       
  1233 		else if (shutdownMethod == KShutdownStopOutput)
       
  1234 			{
       
  1235 			aShutdown = RSocket::EStopOutput;
       
  1236 			}
       
  1237 		else if (shutdownMethod == KShutdownImmediate)
       
  1238 			{
       
  1239 			aShutdown = RSocket::EImmediate;
       
  1240 			}
       
  1241 		else
       
  1242 			{
       
  1243 			TInt	intMode;
       
  1244 			if ( aDataWrapper.GetIntFromConfig(aSection, KShutdownMethod(), intMode) )
       
  1245 				{
       
  1246 				aShutdown = (RSocket::TShutdown)intMode;
       
  1247 				}
       
  1248 			else
       
  1249 				{
       
  1250 				aDataWrapper.ERR_PRINTF2(_L("Illegal mode %S"), &KShutdownMethod());
       
  1251 				aDataWrapper.SetBlockResult(EFail);
       
  1252 				ret=EFalse;
       
  1253 				}
       
  1254 			}
       
  1255 		}
       
  1256 
       
  1257 	return ret;
       
  1258 	}
       
  1259 
       
  1260 void CT_BTUtil::GetTBTPacketType(CDataWrapper& aDataWrapper, const TDesC& aSection, TInt& aType)
       
  1261 	{
       
  1262 	TBuf<KMaxTestExecuteCommandLength>	tempStore;
       
  1263 
       
  1264 	aType=0;
       
  1265 	TBool	moreData=ETrue;
       
  1266 	TInt	index=0;
       
  1267 	while ( moreData )
       
  1268 		{
       
  1269 		TPtrC	typeName;
       
  1270 		tempStore.Format(KPacketTypes(), ++index);
       
  1271 
       
  1272 		moreData=aDataWrapper.GetStringFromConfig(aSection, tempStore, typeName);
       
  1273 		if ( moreData )
       
  1274 			{
       
  1275 			if (typeName == KEPacketsDM1)
       
  1276 				{
       
  1277 				aType |= EPacketsDM1;
       
  1278 				}
       
  1279 			else if (typeName == KEPacketsDH1)
       
  1280 				{
       
  1281 				aType |= EPacketsDH1;
       
  1282 				}
       
  1283 			else if (typeName == KEPacketsDM3)
       
  1284 				{
       
  1285 				aType |= EPacketsDM3;
       
  1286 				}
       
  1287 			else if (typeName == KEPacketsDH3)
       
  1288 				{
       
  1289 				aType |= EPacketsDH3;
       
  1290 				}
       
  1291 			else if (typeName == KEPacketsDM5)
       
  1292 				{
       
  1293 				aType |= EPacketsDM5;
       
  1294 				}
       
  1295 			else if (typeName == KEPacketsDH5)
       
  1296 				{
       
  1297 				aType |= EPacketsDH5;
       
  1298 				}
       
  1299 			else if (typeName == KEPacketsHV1)
       
  1300 				{
       
  1301 				aType |= EPacketsHV1;
       
  1302 				}
       
  1303 		 	else if (typeName == KEPacketsHV2)
       
  1304 				{
       
  1305 				aType |= EPacketsHV2;
       
  1306 				}
       
  1307 		 	else if (typeName == KEPacketsHV3)
       
  1308 				{
       
  1309 				aType |= EPacketsHV3;
       
  1310 				}
       
  1311 		  	else if (typeName == KEAnyACLPacket)
       
  1312 				{
       
  1313 				aType |= EAnyACLPacket;
       
  1314 				}
       
  1315 		  	else if (typeName == KEAnySCOPacket)
       
  1316 				{
       
  1317 				aType |= EAnySCOPacket;
       
  1318 				}
       
  1319 		  	else if (typeName == KEAnyPacket)
       
  1320 				{
       
  1321 				aType |= EAnyPacket;
       
  1322 				}
       
  1323 			else
       
  1324 				{
       
  1325 				TInt	intType;
       
  1326 				if ( aDataWrapper.GetIntFromConfig(aSection, tempStore, intType) )
       
  1327 					{
       
  1328 					aType |= intType;
       
  1329 					}
       
  1330 				else
       
  1331 					{
       
  1332 					aDataWrapper.ERR_PRINTF2(_L("Illegal type %S"), &tempStore);
       
  1333 					aDataWrapper.SetBlockResult(EFail);
       
  1334 					}
       
  1335 				}
       
  1336 			}
       
  1337 		else if (index==1)
       
  1338 			{
       
  1339 			//Special case as we would want to use default if not found at all
       
  1340 			aType=EAnyPacket;
       
  1341 			}
       
  1342 		}
       
  1343 	}
       
  1344 
       
  1345 
       
  1346 void CT_BTUtil::GetLinkStateNotifierBits(CDataWrapper& aDataWrapper, const TDesC& aSection, TUint32& aModes)
       
  1347 	{
       
  1348 	// This is from BTTypes.h
       
  1349 
       
  1350 	// Bitmask values for notifying/requesting notification of the state of a physical link.
       
  1351 	//
       
  1352 	// These values have a two fold purpose:
       
  1353 	// 1) They can be used along with TBTPhysicalLinkStateNotifierCombinations to specify
       
  1354 	// a set of baseband change events for which notification is desired.
       
  1355 	// 2) They can be used to notify the state of a physical link or a subset of that state.
       
  1356 	// For example if only mode change events are being monitored, then at each mode change event
       
  1357 	// only the bit reperesenting the new mode will be returned, however if the whole link state
       
  1358 	// is required, then a combination of bit values indicating that state will be returned.
       
  1359 	//
       
  1360 	// THESE BIT VALUES MUST ONLY BE USED WHEN REQUESTING NOTIFICATION, OR WHEN PARSING THE
       
  1361 	// RESULTS OF A NOTIFICATION. All other baseband state activities should use one of the
       
  1362 	// appropriate Bluetooth SIG specified enums
       
  1363 	// TBTBasebandRole, TBTLinkMode, TBTLinkModeCombinations, TBTPacketType,
       
  1364 	// TBTPacketTypeCombinations
       
  1365 	//
       
  1366 
       
  1367 	TBuf<KMaxTestExecuteCommandLength>	tempStore;
       
  1368 
       
  1369 	aModes=0;
       
  1370 	TBool	moreData=ETrue;
       
  1371 	TInt	index=0;
       
  1372 	while ( moreData )
       
  1373 		{
       
  1374 		TPtrC	modeName;
       
  1375 		tempStore.Format(KBaseBandMode(), ++index);
       
  1376 
       
  1377 		moreData=aDataWrapper.GetStringFromConfig(aSection, tempStore, modeName);
       
  1378 		if ( moreData )
       
  1379 			{
       
  1380 			//Master
       
  1381 			if (modeName == KENotifyMaster)
       
  1382 				{
       
  1383 				aModes |= ENotifyMaster;
       
  1384 				}
       
  1385 			//Slave
       
  1386 			else if (modeName == KENotifySlave)
       
  1387 				{
       
  1388 				aModes |= ENotifySlave;
       
  1389 				}
       
  1390 			//Active Mode
       
  1391 			else if (modeName == KENotifyActiveMode)
       
  1392 				{
       
  1393 				aModes |= ENotifyActiveMode;
       
  1394 				}
       
  1395 			//Sniff mode
       
  1396 			else if (modeName == KENotifySniffMode)
       
  1397 				{
       
  1398 				aModes |= ENotifySniffMode;
       
  1399 				}
       
  1400 			//Park mode
       
  1401 			else if (modeName == KENotifyParkMode)
       
  1402 				{
       
  1403 				aModes |= ENotifyParkMode;
       
  1404 				}
       
  1405 			//Hold mode
       
  1406 			else if (modeName == KENotifyHoldMode)
       
  1407 				{
       
  1408 				aModes |= ENotifyHoldMode;
       
  1409 				}
       
  1410 			//Max slots 1
       
  1411 			else if (modeName == KENotifyMaxSlots1)
       
  1412 				{
       
  1413 				aModes |= ENotifyMaxSlots1;
       
  1414 				}
       
  1415 			//Max slots 3
       
  1416 			else if (modeName == KENotifyMaxSlots3)
       
  1417 				{
       
  1418 				aModes |= ENotifyMaxSlots3;
       
  1419 				}
       
  1420 			//Max slots 5
       
  1421 			else if (modeName == KENotifyMaxSlots5)
       
  1422 				{
       
  1423 				aModes |= ENotifyMaxSlots5;
       
  1424 				}
       
  1425 			//Packets DM1
       
  1426 			else if (modeName == KENotifyPacketsDM1)
       
  1427 				{
       
  1428 				aModes |= ENotifyPacketsDM1;
       
  1429 				}
       
  1430 			//Packets DH1
       
  1431 			else if (modeName == KENotifyPacketsDH1)
       
  1432 				{
       
  1433 				aModes |= ENotifyPacketsDH1;
       
  1434 				}
       
  1435 			//Packets DM3
       
  1436 			else if (modeName == KENotifyPacketsDM3)
       
  1437 				{
       
  1438 				aModes |= ENotifyPacketsDM3;
       
  1439 				}
       
  1440 			//Packets DH3
       
  1441 			else if (modeName == KENotifyPacketsDH3)
       
  1442 				{
       
  1443 				aModes |= ENotifyPacketsDH3;
       
  1444 				}
       
  1445 			//Packets DM5
       
  1446 			else if (modeName == KENotifyPacketsDM5)
       
  1447 				{
       
  1448 				aModes |= ENotifyPacketsDM5;
       
  1449 				}
       
  1450 			//Packets DH5
       
  1451 			else if (modeName == KENotifyPacketsDH5)
       
  1452 				{
       
  1453 				aModes |= ENotifyPacketsDH5;
       
  1454 				}
       
  1455 			//HV1
       
  1456 			else if (modeName == KENotifyPacketsHV1)
       
  1457 				{
       
  1458 				aModes |= ENotifyPacketsHV1;
       
  1459 				}
       
  1460 			//HV2
       
  1461 			else if (modeName == KENotifyPacketsHV2)
       
  1462 				{
       
  1463 				aModes |= ENotifyPacketsHV2;
       
  1464 				}
       
  1465 			//HV3
       
  1466 			else if (modeName == KENotifyPacketsHV3)
       
  1467 				{
       
  1468 				aModes |= ENotifyPacketsHV3;
       
  1469 				}
       
  1470 			//Authentication Complete
       
  1471 			else if (modeName == KENotifyAuthenticationComplete)
       
  1472 				{
       
  1473 				aModes |= ENotifyAuthenticationComplete;
       
  1474 				}
       
  1475 			//Encryption Change On
       
  1476 			else if (modeName == KENotifyEncryptionChangeOn)
       
  1477 				{
       
  1478 				aModes |= ENotifyEncryptionChangeOn;
       
  1479 				}
       
  1480 			//Encryption Change Off
       
  1481 			else if (modeName == KENotifyEncryptionChangeOff)
       
  1482 				{
       
  1483 				aModes |= ENotifyEncryptionChangeOff;
       
  1484 				}
       
  1485 			//Physical Link Up
       
  1486 			else if (modeName == KENotifyPhysicalLinkUp)
       
  1487 				{
       
  1488 				aModes |= ENotifyPhysicalLinkUp;
       
  1489 				}
       
  1490 			//Physical Link Down
       
  1491 			else if (modeName == KENotifyPhysicalLinkDown)
       
  1492 				{
       
  1493 				aModes |= ENotifyPhysicalLinkDown;
       
  1494 				}
       
  1495 			//Physical Link Error
       
  1496 			else if (modeName == KENotifyPhysicalLinkError)
       
  1497 				{
       
  1498 				aModes |= ENotifyPhysicalLinkError;
       
  1499 				}
       
  1500 			//SCO Link Up
       
  1501 			else if (modeName == KENotifySCOLinkUp)
       
  1502 				{
       
  1503 				aModes |= ENotifySCOLinkUp;
       
  1504 				}
       
  1505 			//SCO Link Down
       
  1506 			else if (modeName == KENotifySCOLinkDown)
       
  1507 				{
       
  1508 				aModes |= ENotifySCOLinkDown;
       
  1509 				}
       
  1510 			//SCO Link Error
       
  1511 			else if (modeName == KENotifySCOLinkError)
       
  1512 				{
       
  1513 				aModes |= ENotifySCOLinkError;
       
  1514 				}
       
  1515 			else
       
  1516 				{
       
  1517 				TInt	intMode;
       
  1518 				if ( aDataWrapper.GetIntFromConfig(aSection, tempStore, intMode) )
       
  1519 					{
       
  1520 					aModes |= intMode;
       
  1521 					}
       
  1522 				else
       
  1523 					{
       
  1524 					aDataWrapper.ERR_PRINTF2(_L("Illegal type %S"), &KShutdownMethod());
       
  1525 					aDataWrapper.SetBlockResult(EFail);
       
  1526 					}
       
  1527 				}
       
  1528 			}
       
  1529 		}
       
  1530 	}
       
  1531 
       
  1532 // method splitted in blocks to save stack space
       
  1533 TBool CT_BTUtil::GetIntValue(TPtrC aConstantName, TInt& aValue)
       
  1534 	{
       
  1535 	TBool	ret	= ETrue;
       
  1536 	// ************************************************************************
       
  1537 	// bt_sock.h
       
  1538 	// ************************************************************************
       
  1539 	_LIT(KBTAddrFamilyName,							"KBTAddrFamily");
       
  1540 	_LIT(KBTLinkManagerName,						"KBTLinkManager");
       
  1541 	_LIT(KL2CAPName,								"KL2CAP");
       
  1542 	_LIT(KRFCOMMName,								"KRFCOMM");
       
  1543 	_LIT(KSDPName,									"KSDP");
       
  1544 	_LIT(KAVCTPName,								"KAVCTP");
       
  1545 	_LIT(KTCIL2CAPName,								"KTCIL2CAP");
       
  1546 	_LIT(KBTMajorName,								"KBTMajor");
       
  1547 	_LIT(KBTMinorName,								"KBTMinor");
       
  1548 	_LIT(KBTBuildName,								"KBTBuild");
       
  1549 	_LIT(KSolBtBlogName,							"KSolBtBlog");
       
  1550 	_LIT(KSolBtHCIName,								"KSolBtHCI");
       
  1551 	_LIT(KSolBtLMName,								"KSolBtLM");
       
  1552 	_LIT(KSolBtL2CAPName,							"KSolBtL2CAP");
       
  1553 	_LIT(KSolBtRFCOMMName,							"KSolBtRFCOMM");
       
  1554 	_LIT(KSolBtAVCTPName,							"KSolBtAVCTP");
       
  1555 	_LIT(KSolBtACLName,								"KSolBtACL");
       
  1556 	_LIT(KSolBtAVDTPSignallingName,					"KSolBtAVDTPSignalling");
       
  1557 	_LIT(KSolBtAVDTPMediaName,						"KSolBtAVDTPMedia");
       
  1558 	_LIT(KSolBtAVDTPReportingName,					"KSolBtAVDTPReporting");
       
  1559 	_LIT(KSolBtAVDTPRecoveryName,					"KSolBtAVDTPRecovery");
       
  1560 	_LIT(KSolBtAVDTPInternalName,					"KSolBtAVDTPInternal");
       
  1561 	_LIT(KSolBtLMProxyName,							"KSolBtLMProxy");
       
  1562 	_LIT(KSolBtSAPBaseName,							"KSolBtSAPBase");
       
  1563 	_LIT(KSCOListenQueSizeName,						"KSCOListenQueSize");
       
  1564 	_LIT(KL2MinMTUName,								"KL2MinMTU");
       
  1565 	_LIT(KMaxPSMName,								"KMaxPSM");
       
  1566 	_LIT(KMinUserPSMName,							"KMinUserPSM");
       
  1567 	_LIT(KMinPSMName,								"KMinPSM");
       
  1568 	_LIT(KHostResInquiryName,						"KHostResInquiry");
       
  1569 	_LIT(KHostResNameName,							"KHostResName");
       
  1570 	_LIT(KHostResIgnoreCacheName,					"KHostResIgnoreCache");
       
  1571 	_LIT(KHostResCacheName,							"KHostResCache");
       
  1572 	_LIT(KL2CAPEchoRequestIoctlName,				"KL2CAPEchoRequestIoctl");
       
  1573 	_LIT(KL2CAPIncomingMTUIoctlName,				"KL2CAPIncomingMTUIoctl");
       
  1574 	_LIT(KL2CAPOutgoingMTUIoctlName,				"KL2CAPOutgoingMTUIoctl");
       
  1575 	_LIT(KL2CAPUpdateChannelConfigIoctlName,		"KL2CAPUpdateChannelConfigIoctl");
       
  1576 	_LIT(KDefaultBasebandConnectionTimeoutName,		"KDefaultBasebandConnectionTimeout");
       
  1577 	_LIT(KLMAddSCOConnIoctlName,					"KLMAddSCOConnIoctl");
       
  1578 	_LIT(KHCIRemoveSCOConnIoctlName,				"KHCIRemoveSCOConnIoctl");
       
  1579 	_LIT(KHCIChangePacketTypeIoctlName,				"KHCIChangePacketTypeIoctl");
       
  1580 	_LIT(KHCIAuthRequestIoctlName,					"KHCIAuthRequestIoctl");
       
  1581 	_LIT(KHCIEncryptIoctlName,						"KHCIAuthRequestIoctl");
       
  1582 	_LIT(KHCIChangeLinkKeyIoctlName,				"KHCIChangeLinkKeyIoctl");
       
  1583 	_LIT(KHCIMasterLinkKeyIoctlName,				"KHCIMasterLinkKeyIoctl");
       
  1584 	_LIT(KHCIHoldModeIoctlName,						"KHCIHoldModeIoctl");
       
  1585 	_LIT(KHCISniffModeIoctlName,					"KHCISniffModeIoctl");
       
  1586 	_LIT(KHCIExitSniffModeIoctlName,				"KHCIExitSniffModeIoctl");
       
  1587 	_LIT(KHCIParkModeIoctlName,						"KHCIParkModeIoctl");
       
  1588 	_LIT(KHCIExitParkModeIoctlName,					"KHCIExitParkModeIoctl");
       
  1589 	_LIT(KHCIReadPageTimeoutIoctlName,				"KHCIReadPageTimeoutIoctl");
       
  1590 	_LIT(KHCIWritePageTimeoutIoctlName,				"KHCIWritePageTimeoutIoctl");
       
  1591 	_LIT(KHCIReadScanEnableIoctlName,				"KHCIReadScanEnableIoctl");
       
  1592 	_LIT(KHCIWriteScanEnableIoctlName,				"KHCIWriteScanEnableIoctl");
       
  1593 	_LIT(KHCIReadDeviceClassIoctlName,				"KHCIReadDeviceClassIoctl");
       
  1594 	_LIT(KHCIWriteDeviceClassIoctlName,				"KHCIWriteDeviceClassIoctl");
       
  1595 	_LIT(KHCIReadVoiceSettingIoctlName,				"KHCIReadVoiceSettingIoctl");
       
  1596 	_LIT(KHCIWriteVoiceSettingIoctlName,			"KHCIWriteVoiceSettingIoctl");
       
  1597 	_LIT(KHCIReadHoldModeActivityIoctlName,			"KHCIReadHoldModeActivityIoctl");
       
  1598 	_LIT(KHCIWriteHoldModeActivityIoctlName,		"KHCIWriteHoldModeActivityIoctl");
       
  1599 	_LIT(KHCILocalVersionIoctlName,					"KHCILocalVersionIoctl");
       
  1600 	_LIT(KHCILocalFeaturesIoctlName,				"KHCILocalFeaturesIoctl");
       
  1601 	_LIT(KHCICountryCodeIoctlName,					"KHCICountryCodeIoctl");
       
  1602 	_LIT(KHCILocalAddressIoctlName,					"KHCILocalAddressIoctl");
       
  1603 	_LIT(KHCIWriteDiscoverabilityIoctlName,			"KHCIWriteDiscoverabilityIoctl");
       
  1604 	_LIT(KHCIReadDiscoverabilityIoctlName,			"KHCIReadDiscoverabilityIoctl");
       
  1605 	_LIT(KHCIReadAuthenticationEnableIoctlName,		"KHCIReadAuthenticationEnableIoctl");
       
  1606 	_LIT(KHCIWriteAuthenticationEnableIoctlName,	"KHCIWriteAuthenticationEnableIoctl");
       
  1607 	_LIT(KL2CAPPassiveAutoBindName,					"KL2CAPPassiveAutoBind");
       
  1608 	_LIT(KRFCOMMModemStatusCmdIoctlName,			"KRFCOMMModemStatusCmdIoctl");
       
  1609 	_LIT(KRFCOMMRemoteLineStatusCmdIoctlName,		"KRFCOMMRemoteLineStatusCmdIoctl");
       
  1610 	_LIT(KRFCOMMRemotePortNegCmdIoctlName,			"KRFCOMMRemotePortNegCmdIoctl");
       
  1611 	_LIT(KRFCOMMRemotePortNegRequestIoctlName,		"KRFCOMMRemotePortNegRequestIoctl");
       
  1612 	_LIT(KRFCOMMConfigChangeIndicationIoctlName,	"KRFCOMMConfigChangeIndicationIoctl");
       
  1613 	_LIT(KRFCOMMLocalPortParameterName,				"KRFCOMMLocalPortParameter");
       
  1614 	_LIT(KRFCOMMGetAvailableServerChannelName,		"KRFCOMMGetAvailableServerChannel");
       
  1615 	_LIT(KRFCOMMMaximumSupportedMTUName,			"KRFCOMMMaximumSupportedMTU");
       
  1616 	_LIT(KRFCOMMGetDebug1Name,						"KRFCOMMGetDebug1");
       
  1617 	_LIT(KRFCOMMGetRemoteModemStatusName,			"KRFCOMMGetRemoteModemStatus");
       
  1618 	_LIT(KRFCOMMGetTransmitCreditName,				"KRFCOMMGetTransmitCredit");
       
  1619 	_LIT(KRFCOMMGetReceiveCreditName,				"KRFCOMMGetReceiveCredit");
       
  1620 	_LIT(KRFCOMMGetReUsedCountName,					"KRFCOMMGetReUsedCount");
       
  1621 	_LIT(KRFCOMMFlowTypeCBFCName,					"KRFCOMMFlowTypeCBFC");
       
  1622 	_LIT(KRFCOMMLocalModemStatusName,				"KRFCOMMLocalModemStatus");
       
  1623 	_LIT(KErrBadHandleName,							"KErrBadHandle");
       
  1624 	_LIT(KZero,										"Zero");
       
  1625 	_LIT(KOne,										"One");
       
  1626 	_LIT(ELMOutboundACLSizeName,					"ELMOutboundACLSize");
       
  1627 	_LIT(ELMInboundACLSizeName,						"ELMInboundACLSize");
       
  1628 	_LIT(KLMGetACLHandleName,						"KLMGetACLHandle");
       
  1629 	_LIT(KLMGetACLLinkCountName,					"KLMGetACLLinkCount");
       
  1630 	_LIT(KLMGetACLLinkArrayName,					"KLMGetACLLinkArray");
       
  1631 	_LIT(KLMSetBasebandConnectionPolicyName,		"KLMSetBasebandConnectionPolicy");
       
  1632 	_LIT(KLMGetBasebandHandleName,					"KLMGetBasebandHandle");
       
  1633 	_LIT(EBBSubscribePhysicalLinkName,				"EBBSubscribePhysicalLink");
       
  1634 	_LIT(EBBBeginRawName,							"EBBBeginRaw");
       
  1635 	_LIT(EBBRequestRoleMasterName,					"EBBRequestRoleMaster");
       
  1636 	_LIT(EBBRequestRoleSlaveName,					"EBBRequestRoleSlave");
       
  1637 	_LIT(EBBCancelModeRequestName,					"EBBCancelModeRequest");
       
  1638 	_LIT(EBBRequestSniffName,						"EBBRequestSniff");
       
  1639 	_LIT(EBBRequestParkName,						"EBBRequestPark");
       
  1640 	_LIT(EBBRequestPreventRoleChangeName,			"EBBRequestPreventRoleChange");
       
  1641 	_LIT(EBBRequestAllowRoleChangeName,				"EBBRequestAllowRoleChange");
       
  1642 	_LIT(EBBRequestChangeSupportedPacketTypesName,	"EBBRequestChangeSupportedPacketTypes");
       
  1643 	_LIT(EBBEnumeratePhysicalLinksName,				"EBBEnumeratePhysicalLinks");
       
  1644 	_LIT(EBBGetPhysicalLinkStateName,				"EBBGetPhysicalLinkState");
       
  1645 	_LIT(EBBGetSniffIntervalName,					"EBBGetSniffInterval");
       
  1646 	_LIT(EBBRequestLinkAuthenticationName,			"EBBRequestLinkAuthentication");
       
  1647 	_LIT(EBBRequestPreventSniffName,				"EBBRequestPreventSniff");
       
  1648 	_LIT(EBBRequestPreventHoldName,					"EBBRequestPreventHold");
       
  1649 	_LIT(EBBRequestPreventParkName,					"EBBRequestPreventPark");
       
  1650 	_LIT(EBBRequestPreventAllLowPowerModesName,		"EBBRequestPreventAllLowPowerModes");
       
  1651 	_LIT(EBBRequestAllowSniffName,					"EBBRequestAllowSniff");
       
  1652 	_LIT(EBBRequestAllowHoldName,					"EBBRequestAllowHold");
       
  1653 	_LIT(EBBRequestAllowParkName,					"EBBRequestAllowPark");
       
  1654 	_LIT(EBBRequestAllowAllLowPowerModesName,		"EBBRequestAllowAllLowPowerModes");
       
  1655 	_LIT(KBTRegisterCodServiceName,					"KBTRegisterCodService");
       
  1656 	_LIT(KBTSecurityDeviceOverrideName,				"KBTSecurityDeviceOverride");
       
  1657 	_LIT(KESockDefaultMessageSlotsName,				"KESockDefaultMessageSlots");
       
  1658 	_LIT(KUseEmbeddedUniqueIdName,					"KUseEmbeddedUniqueId");
       
  1659 	_LIT(KConnProgressDefaultName,					"KConnProgressDefault");
       
  1660 	_LIT(KMaxSockAddrSizeName,						"KMaxSockAddrSize");
       
  1661 	_LIT(KAFUnspecName,								"KAFUnspec");
       
  1662 	_LIT(KSockStreamName,							"KSockStream");
       
  1663 	_LIT(KSockDatagramName,							"KSockDatagram");
       
  1664 	_LIT(KSockSeqPacketName,						"KSockSeqPacket");
       
  1665 	_LIT(KSockRawName,								"KSockRaw");
       
  1666 	_LIT(KSOLSocketName,							"KSOLSocket");
       
  1667 	_LIT(KLevelUnspecifiedName,						"KLevelUnspecified");
       
  1668 	_LIT(KSODebugName,								"KSODebug");
       
  1669 	_LIT(KSORecvBufName,							"KSORecvBuf");
       
  1670 	_LIT(KSOSendBufName,							"KSOSendBuf");
       
  1671 	_LIT(KSONonBlockingIOName,						"KSONonBlockingIO");
       
  1672 	_LIT(KSOBlockingIOName,							"KSOBlockingIO");
       
  1673 	_LIT(KSOSelectPollName,							"KSOSelectPoll");
       
  1674 	_LIT(KSOReadBytesPendingName,					"KSOReadBytesPending");
       
  1675 	_LIT(KSOUrgentDataOffsetName,					"KSOUrgentDataOffset");
       
  1676 	_LIT(KSOSelectLastErrorName,					"KSOSelectLastError");
       
  1677 	_LIT(KSOEnableTransferName,						"KSOEnableTransfer");
       
  1678 	_LIT(KSODisableTransferName,					"KSODisableTransfer");
       
  1679 	_LIT(KSocketBufSizeUndefinedName,				"KSocketBufSizeUndefined");
       
  1680 	_LIT(KSocketDefaultBufferSizeName,				"KSocketDefaultBufferSize");
       
  1681 	_LIT(KSocketInternalOptionBitName,				"KSocketInternalOptionBit");
       
  1682 	_LIT(KIOctlSelectName,							"KIOctlSelect");
       
  1683 	_LIT(KSockSelectReadName,						"KSockSelectRead");
       
  1684 	_LIT(KSockSelectWriteName,						"KSockSelectWrite");
       
  1685 	_LIT(KSockSelectExceptName,						"KSockSelectExcept");
       
  1686 	_LIT(KSockSelectReadContinuationName,			"KSockSelectReadContinuation");
       
  1687 	_LIT(KSockWriteUrgentName,						"KSockWriteUrgent");
       
  1688 	_LIT(KSocketInternalWriteBitName,				"KSocketInternalWriteBit");
       
  1689 	_LIT(KSockWriteSystemMaskName,					"KSockWriteSystemMask");
       
  1690 	_LIT(KSockReadPeekName,							"KSockReadPeek");
       
  1691 	_LIT(KSocketInternalReadBitName,				"KSocketInternalReadBit");
       
  1692 	_LIT(KSockReadContinuationName,					"KSockReadContinuation");
       
  1693 	_LIT(KSIConnectionLessName,						"KSIConnectionLess");
       
  1694 	_LIT(KSIReliableName,							"KSIReliable");
       
  1695 	_LIT(KSIInOrderName,							"KSIInOrder");
       
  1696 	_LIT(KSIMessageBasedName,						"KSIMessageBased");
       
  1697 	_LIT(KSIDatagramName,							"KSIDatagram");
       
  1698 	_LIT(KSIStreamBasedName,						"KSIStreamBased");
       
  1699 	_LIT(KSIPseudoStreamName,						"KSIPseudoStream");
       
  1700 	_LIT(KSIUrgentDataName,							"KSIUrgentData");
       
  1701 	_LIT(KSIConnectDataName,						"KSIConnectData");
       
  1702 	_LIT(KSIDisconnectDataName,						"KSIDisconnectData");
       
  1703 	_LIT(KSIBroadcastName,							"KSIBroadcast");
       
  1704 	_LIT(KSIMultiPointName,							"KSIMultiPoint");
       
  1705 	_LIT(KSIQOSName,								"KSIQOS");
       
  1706 	_LIT(KSIWriteOnlyName,							"KSIWriteOnly");
       
  1707 	_LIT(KSIReadOnlyName,							"KSIReadOnly");
       
  1708 	_LIT(KSIGracefulCloseName,						"KSIGracefulClose");
       
  1709 	_LIT(KSICanReconnectName,						"KSICanReconnect");
       
  1710 	_LIT(KSIPeekDataName,							"KSIPeekData");
       
  1711 	_LIT(KSIRequiresOwnerInfoName,					"KSIRequiresOwnerInfo");
       
  1712 	_LIT(KNSNameResolutionName,						"KNSNameResolution");
       
  1713 	_LIT(KNSHeirarchicalNamingName,					"KNSHeirarchicalNaming");
       
  1714 	_LIT(KNSRemoteDiscoveryName,					"KNSRemoteDiscovery");
       
  1715 	_LIT(KNSServiceResolutionName,					"KNSServiceResolution");
       
  1716 	_LIT(KNSNameRegistrationName,					"KNSNameRegistration");
       
  1717 	_LIT(KNSServiceRegistrationName,				"KNSServiceRegistration");
       
  1718 	_LIT(KNSDynamicAddressingName,					"KNSDynamicAddressing");
       
  1719 	_LIT(KNSInfoDatabaseName,						"KNSInfoDatabase");
       
  1720 	_LIT(KNSRequiresConnectionStartupName,			"KNSRequiresConnectionStartup");
       
  1721 	_LIT(KSocketNoSecurityName,						"KSocketNoSecurity");
       
  1722 	_LIT(KSecureSocketsName,						"KSecureSockets");
       
  1723 	_LIT(KSocketMessageSizeIsStreamName,			"KSocketMessageSizeIsStream");
       
  1724 	_LIT(KSocketMessageSizeUndefinedName,			"KSocketMessageSizeUndefined");
       
  1725 	_LIT(KSocketMessageSizeNoLimitName,				"KSocketMessageSizeNoLimit");
       
  1726 	_LIT(KUndefinedSockTypeName,					"KUndefinedSockType");
       
  1727 	_LIT(KUndefinedProtocolName,					"KUndefinedProtocol");
       
  1728 	_LIT(KErrWouldBlockName,						"KErrWouldBlock");
       
  1729 	_LIT(KErrConnectionTerminatedName,				"KErrConnectionTerminated");
       
  1730 	_LIT(KErrCannotFindProtocolName,				"KErrCannotFindProtocol");
       
  1731 	_LIT(KCOLConnectionName,						"KCOLConnection");
       
  1732 	_LIT(KCOLProviderName,							"KCOLProvider");
       
  1733 	_LIT(KConnInternalOptionBitName,				"KConnInternalOptionBit");
       
  1734 	_LIT(KConnWriteUserDataBitName,					"KConnWriteUserDataBit");
       
  1735 	_LIT(KConnReadUserDataBitName,					"KConnReadUserDataBit");
       
  1736 	_LIT(KCoEnumerateConnectionClientsName,			"KCoEnumerateConnectionClients");
       
  1737 	_LIT(KCoGetConnectionClientInfoName,			"KCoGetConnectionClientInfo");
       
  1738 	_LIT(KCoGetConnectionSocketInfoName,			"KCoGetConnectionSocketInfo");
       
  1739 	_LIT(KConnectionTypeDefaultName,				"KConnectionTypeDefault");
       
  1740 	_LIT(KSubConnParamsInterfaceUidName,			"KSubConnParamsInterfaceUid");
       
  1741 	_LIT(KSubConnEventInterfaceUidName,				"KSubConnEventInterfaceUid");
       
  1742 	_LIT(KSubConnGenericParamsImplUidName,			"KSubConnGenericParamsImplUid");
       
  1743 	_LIT(KSubConnGenericEventsImplUidName,			"KSubConnGenericEventsImplUid");
       
  1744 	_LIT(KSubConGlobalFamilyName,					"KSubConGlobalFamily");
       
  1745 	_LIT(KSubConQoSFamilyName,						"KSubConQoSFamily");
       
  1746 	_LIT(KSubConAuthorisationFamilyName,			"KSubConAuthorisationFamily");
       
  1747 	_LIT(KNotificationEventMaxSizeName,				"KNotificationEventMaxSize");
       
  1748 
       
  1749 	// BT Address Family
       
  1750 	if (aConstantName==KBTAddrFamilyName)
       
  1751 		{
       
  1752 		aValue=KBTAddrFamily;
       
  1753 		}
       
  1754 	else if (aConstantName==KBTLinkManagerName)
       
  1755 		{
       
  1756 		aValue=KBTLinkManager;
       
  1757 		}
       
  1758 	else if (aConstantName==KL2CAPName)
       
  1759 		{
       
  1760 		aValue=KL2CAP;
       
  1761 		}
       
  1762 	else if (aConstantName==KRFCOMMName)
       
  1763 		{
       
  1764 		aValue=KRFCOMM;
       
  1765 		}
       
  1766 	else if (aConstantName==KSDPName)
       
  1767 		{
       
  1768 		aValue=KSDP;
       
  1769 		}
       
  1770 	else if (aConstantName==KAVCTPName)
       
  1771 		{
       
  1772 		aValue=KAVCTP;
       
  1773 		}
       
  1774 	else if (aConstantName==KTCIL2CAPName)
       
  1775 		{
       
  1776 		aValue=KTCIL2CAP;
       
  1777 		}
       
  1778 	else if (aConstantName==KBTMajorName)
       
  1779 		{
       
  1780 		aValue=KBTMajor;
       
  1781 		}
       
  1782 	else if (aConstantName==KBTMinorName)
       
  1783 		{
       
  1784 		aValue=KBTMinor;
       
  1785 		}
       
  1786 	else if (aConstantName==KBTBuildName)
       
  1787 		{
       
  1788 		aValue=KBTBuild;
       
  1789 		}
       
  1790 	else if (aConstantName==KSolBtBlogName)
       
  1791 		{
       
  1792 		aValue=KSolBtBlog;
       
  1793 		}
       
  1794 	else if (aConstantName==KSolBtHCIName)
       
  1795 		{
       
  1796 		aValue=KSolBtHCI;
       
  1797 		}
       
  1798 	else if (aConstantName==KSolBtLMName)
       
  1799 		{
       
  1800 		aValue=KSolBtLM;
       
  1801 		}
       
  1802 	else if (aConstantName==KSolBtL2CAPName)
       
  1803 		{
       
  1804 		aValue=KSolBtL2CAP;
       
  1805 		}
       
  1806 	else if (aConstantName==KSolBtRFCOMMName)
       
  1807 		{
       
  1808 		aValue=KSolBtRFCOMM;
       
  1809 		}
       
  1810 	else if (aConstantName==KSolBtAVCTPName)
       
  1811 		{
       
  1812 		aValue=KSolBtAVCTP;
       
  1813 		}
       
  1814 	else if (aConstantName==KSolBtACLName)
       
  1815 		{
       
  1816 		aValue=KSolBtACL;
       
  1817 		}
       
  1818 	else if (aConstantName==KSolBtAVDTPSignallingName)
       
  1819 		{
       
  1820 		aValue=KSolBtAVDTPSignalling;
       
  1821 		}
       
  1822 	else if (aConstantName==KSolBtAVDTPMediaName)
       
  1823 		{
       
  1824 		aValue=KSolBtAVDTPMedia;
       
  1825 		}
       
  1826 	else if (aConstantName==KSolBtAVDTPReportingName)
       
  1827 		{
       
  1828 		aValue=KSolBtAVDTPReporting;
       
  1829 		}
       
  1830 	else if (aConstantName==KSolBtAVDTPRecoveryName)
       
  1831 		{
       
  1832 		aValue=KSolBtAVDTPRecovery;
       
  1833 		}
       
  1834 	else if (aConstantName==KSolBtAVDTPInternalName)
       
  1835 		{
       
  1836 		aValue=KSolBtAVDTPInternal;
       
  1837 		}
       
  1838 	else if (aConstantName==KSolBtLMProxyName)
       
  1839 		{
       
  1840 		aValue=KSolBtLMProxy;
       
  1841 		}
       
  1842 	else if (aConstantName==KSolBtSAPBaseName)
       
  1843 		{
       
  1844 		aValue=KSolBtSAPBase;
       
  1845 		}
       
  1846 	else if (aConstantName==KSCOListenQueSizeName)
       
  1847 		{
       
  1848 		aValue=KSCOListenQueSize;
       
  1849 		}
       
  1850 	else if (aConstantName==KL2MinMTUName)
       
  1851 		{
       
  1852 		aValue=KL2MinMTU;
       
  1853 		}
       
  1854 	else if (aConstantName==KMaxPSMName)
       
  1855 		{
       
  1856 		aValue=KMaxPSM;
       
  1857 		}
       
  1858 	else if (aConstantName==KMinUserPSMName)
       
  1859 		{
       
  1860 		aValue=KMinUserPSM;
       
  1861 		}
       
  1862 	else if (aConstantName==KMinPSMName)
       
  1863 		{
       
  1864 		aValue=KMinPSM;
       
  1865 		}
       
  1866 	else if (aConstantName==KHostResInquiryName)
       
  1867 		{
       
  1868 		aValue=KHostResInquiry;
       
  1869 		}
       
  1870 	else if (aConstantName==KHostResNameName)
       
  1871 		{
       
  1872 		aValue=KHostResName;
       
  1873 		}
       
  1874 	else if (aConstantName==KHostResIgnoreCacheName)
       
  1875 		{
       
  1876 		aValue=KHostResIgnoreCache;
       
  1877 		}
       
  1878 	else if (aConstantName==KHostResCacheName)
       
  1879 		{
       
  1880 		aValue=KHostResCache;
       
  1881 		}
       
  1882 	else if (aConstantName==KL2CAPEchoRequestIoctlName)
       
  1883 		{
       
  1884 		aValue=KL2CAPEchoRequestIoctl;
       
  1885 		}
       
  1886 	else if (aConstantName==KL2CAPIncomingMTUIoctlName)
       
  1887 		{
       
  1888 		aValue=KL2CAPIncomingMTUIoctl;
       
  1889 		}
       
  1890 	else if (aConstantName==KL2CAPOutgoingMTUIoctlName)
       
  1891 		{
       
  1892 		aValue=KL2CAPOutgoingMTUIoctl;
       
  1893 		}
       
  1894 	else if (aConstantName==KL2CAPUpdateChannelConfigIoctlName)
       
  1895 		{
       
  1896 		aValue=KL2CAPUpdateChannelConfigIoctl;
       
  1897 		}
       
  1898 	else if (aConstantName==KDefaultBasebandConnectionTimeoutName)
       
  1899 		{
       
  1900 		aValue=KDefaultBasebandConnectionTimeout;
       
  1901 		}
       
  1902 	else if (aConstantName==KLMAddSCOConnIoctlName)
       
  1903 		{
       
  1904 		aValue=KLMAddSCOConnIoctl;
       
  1905 		}
       
  1906 	else if (aConstantName==KHCIRemoveSCOConnIoctlName)
       
  1907 		{
       
  1908 		aValue=KHCIRemoveSCOConnIoctl;
       
  1909 		}
       
  1910 	else if (aConstantName==KHCIChangePacketTypeIoctlName)
       
  1911 		{
       
  1912 		aValue=KHCIChangePacketTypeIoctl;
       
  1913 		}
       
  1914 	else if (aConstantName==KHCIAuthRequestIoctlName)
       
  1915 		{
       
  1916 		aValue=KHCIAuthRequestIoctl;
       
  1917 		}
       
  1918 	else if (aConstantName==KHCIEncryptIoctlName)
       
  1919 		{
       
  1920 		aValue=KHCIEncryptIoctl;
       
  1921 		}
       
  1922 	else if (aConstantName==KHCIChangeLinkKeyIoctlName)
       
  1923 		{
       
  1924 		aValue=KHCIChangeLinkKeyIoctl;
       
  1925 		}
       
  1926 	else if (aConstantName==KHCIMasterLinkKeyIoctlName)
       
  1927 		{
       
  1928 		aValue=KHCIMasterLinkKeyIoctl;
       
  1929 		}
       
  1930 	else if (aConstantName==KHCIHoldModeIoctlName)
       
  1931 		{
       
  1932 		aValue=KHCIHoldModeIoctl;
       
  1933 		}
       
  1934 	else if (aConstantName==KHCISniffModeIoctlName)
       
  1935 		{
       
  1936 		aValue=KHCISniffModeIoctl;
       
  1937 		}
       
  1938 	else if (aConstantName==KHCIExitSniffModeIoctlName)
       
  1939 		{
       
  1940 		aValue=KHCIExitSniffModeIoctl;
       
  1941 		}
       
  1942 	else if (aConstantName==KHCIParkModeIoctlName)
       
  1943 		{
       
  1944 		aValue=KHCIParkModeIoctl;
       
  1945 		}
       
  1946 	else if (aConstantName==KHCIExitParkModeIoctlName)
       
  1947 		{
       
  1948 		aValue=KHCIExitParkModeIoctl;
       
  1949 		}
       
  1950 	else if (aConstantName==KHCIReadPageTimeoutIoctlName)
       
  1951 		{
       
  1952 		aValue=KHCIReadPageTimeoutIoctl;
       
  1953 		}
       
  1954 	else if (aConstantName==KHCIWritePageTimeoutIoctlName)
       
  1955 		{
       
  1956 		aValue=KHCIWritePageTimeoutIoctl;
       
  1957 		}
       
  1958 	else if (aConstantName==KHCIReadScanEnableIoctlName)
       
  1959 		{
       
  1960 		aValue=KHCIReadScanEnableIoctl;
       
  1961 		}
       
  1962 	else if (aConstantName==KHCIWriteScanEnableIoctlName)
       
  1963 		{
       
  1964 		aValue=KHCIWriteScanEnableIoctl;
       
  1965 		}
       
  1966 	else if (aConstantName==KHCIReadDeviceClassIoctlName)
       
  1967 		{
       
  1968 		aValue=KHCIReadDeviceClassIoctl;
       
  1969 		}
       
  1970 	else if (aConstantName==KHCIWriteDeviceClassIoctlName)
       
  1971 		{
       
  1972 		aValue=KHCIWriteDeviceClassIoctl;
       
  1973 		}
       
  1974 	else if (aConstantName==KHCIReadVoiceSettingIoctlName)
       
  1975 		{
       
  1976 		aValue=KHCIReadVoiceSettingIoctl;
       
  1977 		}
       
  1978 	else if (aConstantName==KHCIWriteVoiceSettingIoctlName)
       
  1979 		{
       
  1980 		aValue=KHCIWriteVoiceSettingIoctl;
       
  1981 		}
       
  1982 	else if (aConstantName==KHCIReadHoldModeActivityIoctlName)
       
  1983 		{
       
  1984 		aValue=KHCIReadHoldModeActivityIoctl;
       
  1985 		}
       
  1986 	else if (aConstantName==KHCIWriteHoldModeActivityIoctlName)
       
  1987 		{
       
  1988 		aValue=KHCIWriteHoldModeActivityIoctl;
       
  1989 		}
       
  1990 	else if (aConstantName==KHCILocalVersionIoctlName)
       
  1991 		{
       
  1992 		aValue=KHCILocalVersionIoctl;
       
  1993 		}
       
  1994 	else if (aConstantName==KHCILocalFeaturesIoctlName)
       
  1995 		{
       
  1996 		aValue=KHCILocalFeaturesIoctl;
       
  1997 		}
       
  1998 	else if (aConstantName==KHCICountryCodeIoctlName)
       
  1999 		{
       
  2000 		aValue=KHCICountryCodeIoctl;
       
  2001 		}
       
  2002 	else if (aConstantName==KHCILocalAddressIoctlName)
       
  2003 		{
       
  2004 		aValue=KHCILocalAddressIoctl;
       
  2005 		}
       
  2006 	else if (aConstantName==KHCIWriteDiscoverabilityIoctlName)
       
  2007 		{
       
  2008 		aValue=KHCIWriteDiscoverabilityIoctl;
       
  2009 		}
       
  2010 	else if (aConstantName==KHCIReadDiscoverabilityIoctlName)
       
  2011 		{
       
  2012 		aValue=KHCIReadDiscoverabilityIoctl;
       
  2013 		}
       
  2014 	else if (aConstantName==KHCIReadAuthenticationEnableIoctlName)
       
  2015 		{
       
  2016 		aValue=KHCIReadAuthenticationEnableIoctl;
       
  2017 		}
       
  2018 	else if (aConstantName==KHCIWriteAuthenticationEnableIoctlName)
       
  2019 		{
       
  2020 		aValue=KHCIWriteAuthenticationEnableIoctl;
       
  2021 		}
       
  2022 	else if (aConstantName==KL2CAPPassiveAutoBindName)
       
  2023 		{
       
  2024 		aValue=KL2CAPPassiveAutoBind;
       
  2025 		}
       
  2026 	else if (aConstantName==KRFCOMMModemStatusCmdIoctlName)
       
  2027 		{
       
  2028 		aValue=KRFCOMMModemStatusCmdIoctl;
       
  2029 		}
       
  2030 	else if (aConstantName==KRFCOMMRemoteLineStatusCmdIoctlName)
       
  2031 		{
       
  2032 		aValue=KRFCOMMRemoteLineStatusCmdIoctl;
       
  2033 		}
       
  2034 	else if (aConstantName==KRFCOMMRemotePortNegCmdIoctlName)
       
  2035 		{
       
  2036 		aValue=KRFCOMMRemotePortNegCmdIoctl;
       
  2037 		}
       
  2038 	else if (aConstantName==KRFCOMMRemotePortNegRequestIoctlName)
       
  2039 		{
       
  2040 		aValue=KRFCOMMRemotePortNegRequestIoctl;
       
  2041 		}
       
  2042 	else if (aConstantName==KRFCOMMConfigChangeIndicationIoctlName)
       
  2043 		{
       
  2044 		aValue=KRFCOMMConfigChangeIndicationIoctl;
       
  2045 		}
       
  2046 	else if (aConstantName==KRFCOMMLocalPortParameterName)
       
  2047 		{
       
  2048 		aValue=KRFCOMMLocalPortParameter;
       
  2049 		}
       
  2050 	else if (aConstantName==KRFCOMMGetAvailableServerChannelName)
       
  2051 		{
       
  2052 		aValue=KRFCOMMGetAvailableServerChannel;
       
  2053 		}
       
  2054 	else if (aConstantName==KRFCOMMMaximumSupportedMTUName)
       
  2055 		{
       
  2056 		aValue=KRFCOMMMaximumSupportedMTU;
       
  2057 		}
       
  2058 	else if (aConstantName==KRFCOMMGetDebug1Name)
       
  2059 		{
       
  2060 		aValue=KRFCOMMGetDebug1;
       
  2061 		}
       
  2062 	else if (aConstantName==KRFCOMMGetRemoteModemStatusName)
       
  2063 		{
       
  2064 		aValue=KRFCOMMGetRemoteModemStatus;
       
  2065 		}
       
  2066 	else if (aConstantName==KRFCOMMGetTransmitCreditName)
       
  2067 		{
       
  2068 		aValue=KRFCOMMGetTransmitCredit;
       
  2069 		}
       
  2070 	else if (aConstantName==KRFCOMMGetReceiveCreditName)
       
  2071 		{
       
  2072 		aValue=KRFCOMMGetReceiveCredit;
       
  2073 		}
       
  2074 	else if (aConstantName==KRFCOMMGetReUsedCountName)
       
  2075 		{
       
  2076 		aValue=KRFCOMMGetReUsedCount;
       
  2077 		}
       
  2078 	else if (aConstantName==KRFCOMMFlowTypeCBFCName)
       
  2079 		{
       
  2080 		aValue=KRFCOMMFlowTypeCBFC;
       
  2081 		}
       
  2082 	else if (aConstantName==KRFCOMMLocalModemStatusName)
       
  2083 		{
       
  2084 		aValue=KRFCOMMLocalModemStatus;
       
  2085 		}
       
  2086 	else if (aConstantName==KErrBadHandleName)
       
  2087 		{
       
  2088 		aValue=KErrBadHandle;
       
  2089 		}
       
  2090 	else if (aConstantName==KZero)
       
  2091 		{
       
  2092 		aValue=0;
       
  2093 		}
       
  2094 	else if (aConstantName==KOne)
       
  2095 		{
       
  2096 		aValue=1;
       
  2097 		}
       
  2098 	else if (aConstantName==ELMOutboundACLSizeName)
       
  2099 		{
       
  2100 		aValue=ELMOutboundACLSize;
       
  2101 		}
       
  2102 	else if (aConstantName==ELMInboundACLSizeName)
       
  2103 		{
       
  2104 		aValue=ELMInboundACLSize;
       
  2105 		}
       
  2106 	else if (aConstantName==KLMGetACLHandleName)
       
  2107 		{
       
  2108 		aValue=KLMGetACLHandle;
       
  2109 		}
       
  2110 	else if (aConstantName==KLMGetACLLinkCountName)
       
  2111 		{
       
  2112 		aValue=KLMGetACLLinkCount;
       
  2113 		}
       
  2114 	else if (aConstantName==KLMGetACLLinkArrayName)
       
  2115 		{
       
  2116 		aValue=KLMGetACLLinkArray;
       
  2117 		}
       
  2118 	else if (aConstantName==KLMSetBasebandConnectionPolicyName)
       
  2119 		{
       
  2120 		aValue=KLMSetBasebandConnectionPolicy;
       
  2121 		}
       
  2122 	else if (aConstantName==KLMGetBasebandHandleName)
       
  2123 		{
       
  2124 		aValue=KLMGetBasebandHandle;
       
  2125 		}
       
  2126 	else if (aConstantName==EBBSubscribePhysicalLinkName)
       
  2127 		{
       
  2128 		aValue=EBBSubscribePhysicalLink;
       
  2129 		}
       
  2130 	else if (aConstantName==EBBBeginRawName)
       
  2131 		{
       
  2132 		aValue=EBBBeginRaw;
       
  2133 		}
       
  2134 	else if (aConstantName==EBBRequestRoleMasterName)
       
  2135 		{
       
  2136 		aValue=EBBRequestRoleMaster;
       
  2137 		}
       
  2138 	else if (aConstantName==EBBRequestRoleSlaveName)
       
  2139 		{
       
  2140 		aValue=EBBRequestRoleSlave;
       
  2141 		}
       
  2142 	else if (aConstantName==EBBCancelModeRequestName)
       
  2143 		{
       
  2144 		aValue=EBBCancelModeRequest;
       
  2145 		}
       
  2146 	else if (aConstantName==EBBRequestSniffName)
       
  2147 		{
       
  2148 		aValue=EBBRequestSniff;
       
  2149 		}
       
  2150 	else if (aConstantName==EBBRequestParkName)
       
  2151 		{
       
  2152 		aValue=EBBRequestPark;
       
  2153 		}
       
  2154 	else if (aConstantName==EBBRequestPreventRoleChangeName)
       
  2155 		{
       
  2156 		aValue=EBBRequestPreventRoleChange;
       
  2157 		}
       
  2158 	else if (aConstantName==EBBRequestAllowRoleChangeName)
       
  2159 		{
       
  2160 		aValue=EBBRequestAllowRoleChange;
       
  2161 		}
       
  2162 	else if (aConstantName==EBBRequestChangeSupportedPacketTypesName)
       
  2163 		{
       
  2164 		aValue=EBBRequestChangeSupportedPacketTypes;
       
  2165 		}
       
  2166 	else if (aConstantName==EBBEnumeratePhysicalLinksName)
       
  2167 		{
       
  2168 		aValue=EBBEnumeratePhysicalLinks;
       
  2169 		}
       
  2170 	else if (aConstantName==EBBGetPhysicalLinkStateName)
       
  2171 		{
       
  2172 		aValue=EBBGetPhysicalLinkState;
       
  2173 		}
       
  2174 	else if (aConstantName==EBBGetSniffIntervalName)
       
  2175 		{
       
  2176 		aValue=EBBGetSniffInterval;
       
  2177 		}
       
  2178 	else if (aConstantName==EBBRequestLinkAuthenticationName)
       
  2179 		{
       
  2180 		aValue=EBBRequestLinkAuthentication;
       
  2181 		}
       
  2182 	else if (aConstantName==EBBRequestPreventSniffName)
       
  2183 		{
       
  2184 		aValue=EBBRequestPreventSniff;
       
  2185 		}
       
  2186 	else if (aConstantName==EBBRequestPreventHoldName)
       
  2187 		{
       
  2188 		aValue=EBBRequestPreventHold;
       
  2189 		}
       
  2190 	else if (aConstantName==EBBRequestPreventParkName)
       
  2191 		{
       
  2192 		aValue=EBBRequestPreventPark;
       
  2193 		}
       
  2194 	else if (aConstantName==EBBRequestPreventAllLowPowerModesName)
       
  2195 		{
       
  2196 		aValue=EBBRequestPreventAllLowPowerModes;
       
  2197 		}
       
  2198 	else if (aConstantName==EBBRequestAllowSniffName)
       
  2199 		{
       
  2200 		aValue=EBBRequestAllowSniff;
       
  2201 		}
       
  2202 	else if (aConstantName==EBBRequestAllowHoldName)
       
  2203 		{
       
  2204 		aValue=EBBRequestAllowHold;
       
  2205 		}
       
  2206 	else if (aConstantName==EBBRequestAllowParkName)
       
  2207 		{
       
  2208 		aValue=EBBRequestAllowPark;
       
  2209 		}
       
  2210 	else if (aConstantName==EBBRequestAllowAllLowPowerModesName)
       
  2211 		{
       
  2212 		aValue=EBBRequestAllowAllLowPowerModes;
       
  2213 		}
       
  2214 	else if (aConstantName==KBTRegisterCodServiceName)
       
  2215 		{
       
  2216 		aValue=KBTRegisterCodService;
       
  2217 		}
       
  2218 	else if (aConstantName==KBTSecurityDeviceOverrideName)
       
  2219 		{
       
  2220 		aValue=KBTSecurityDeviceOverride;
       
  2221 		}
       
  2222 	else if (aConstantName==KESockDefaultMessageSlotsName)
       
  2223 		{
       
  2224 		aValue=KESockDefaultMessageSlots;
       
  2225 		}
       
  2226 	else if (aConstantName==KUseEmbeddedUniqueIdName)
       
  2227 		{
       
  2228 		aValue=KUseEmbeddedUniqueId;
       
  2229 		}
       
  2230 	else if (aConstantName==KConnProgressDefaultName)
       
  2231 		{
       
  2232 		aValue=KConnProgressDefault;
       
  2233 		}
       
  2234 	else if (aConstantName==KMaxSockAddrSizeName)
       
  2235 		{
       
  2236 		aValue=KMaxSockAddrSize;
       
  2237 		}
       
  2238 	else if (aConstantName==KAFUnspecName)
       
  2239 		{
       
  2240 		aValue=KAFUnspec;
       
  2241 		}
       
  2242 	else if (aConstantName==KSockStreamName)
       
  2243 		{
       
  2244 		aValue=KSockStream;
       
  2245 		}
       
  2246 	else if (aConstantName==KSockDatagramName)
       
  2247 		{
       
  2248 		aValue=KSockDatagram;
       
  2249 		}
       
  2250 	else if (aConstantName==KSockSeqPacketName)
       
  2251 		{
       
  2252 		aValue=KSockSeqPacket;
       
  2253 		}
       
  2254 	else if (aConstantName==KSockRawName)
       
  2255 		{
       
  2256 		aValue=KSockRaw;
       
  2257 		}
       
  2258 	else if (aConstantName==KSOLSocketName)
       
  2259 		{
       
  2260 		aValue=KSOLSocket;
       
  2261 		}
       
  2262 	else if (aConstantName==KLevelUnspecifiedName)
       
  2263 		{
       
  2264 		aValue=KLevelUnspecified;
       
  2265 		}
       
  2266 	else if (aConstantName==KSODebugName)
       
  2267 		{
       
  2268 		aValue=KSODebug;
       
  2269 		}
       
  2270 	else if (aConstantName==KSORecvBufName)
       
  2271 		{
       
  2272 		aValue=KSORecvBuf;
       
  2273 		}
       
  2274 	else if (aConstantName==KSOSendBufName)
       
  2275 		{
       
  2276 		aValue=KSOSendBuf;
       
  2277 		}
       
  2278 	else if (aConstantName==KSONonBlockingIOName)
       
  2279 		{
       
  2280 		aValue=KSONonBlockingIO;
       
  2281 		}
       
  2282 	else if (aConstantName==KSOBlockingIOName)
       
  2283 		{
       
  2284 		aValue=KSOBlockingIO;
       
  2285 		}
       
  2286 	else if (aConstantName==KSOSelectPollName)
       
  2287 		{
       
  2288 		aValue=KSOSelectPoll;
       
  2289 		}
       
  2290 	else if (aConstantName==KSOReadBytesPendingName)
       
  2291 		{
       
  2292 		aValue=KSOReadBytesPending;
       
  2293 		}
       
  2294 	else if (aConstantName==KSOUrgentDataOffsetName)
       
  2295 		{
       
  2296 		aValue=KSOUrgentDataOffset;
       
  2297 		}
       
  2298 	else if (aConstantName==KSOSelectLastErrorName)
       
  2299 		{
       
  2300 		aValue=KSOSelectLastError;
       
  2301 		}
       
  2302 	else if (aConstantName==KSOEnableTransferName)
       
  2303 		{
       
  2304 		aValue=KSOEnableTransfer;
       
  2305 		}
       
  2306 	else if (aConstantName==KSODisableTransferName)
       
  2307 		{
       
  2308 		aValue=KSODisableTransfer;
       
  2309 		}
       
  2310 	else if (aConstantName==KSocketBufSizeUndefinedName)
       
  2311 		{
       
  2312 		aValue=KSocketBufSizeUndefined;
       
  2313 		}
       
  2314 	else if (aConstantName==KSocketDefaultBufferSizeName)
       
  2315 		{
       
  2316 		aValue=KSocketDefaultBufferSize;
       
  2317 		}
       
  2318 	else if (aConstantName==KSocketInternalOptionBitName)
       
  2319 		{
       
  2320 		aValue=KSocketInternalOptionBit;
       
  2321 		}
       
  2322 	else if (aConstantName==KIOctlSelectName)
       
  2323 		{
       
  2324 		aValue=KIOctlSelect;
       
  2325 		}
       
  2326 	else if (aConstantName==KSockSelectReadName)
       
  2327 		{
       
  2328 		aValue=KSockSelectRead;
       
  2329 		}
       
  2330 	else if (aConstantName==KSockSelectWriteName)
       
  2331 		{
       
  2332 		aValue=KSockSelectWrite;
       
  2333 		}
       
  2334 	else if (aConstantName==KSockSelectExceptName)
       
  2335 		{
       
  2336 		aValue=KSockSelectExcept;
       
  2337 		}
       
  2338 	else if (aConstantName==KSockSelectReadContinuationName)
       
  2339 		{
       
  2340 		aValue=KSockSelectReadContinuation;
       
  2341 		}
       
  2342 	else if (aConstantName==KSockWriteUrgentName)
       
  2343 		{
       
  2344 		aValue=KSockWriteUrgent;
       
  2345 		}
       
  2346 	else if (aConstantName==KSocketInternalWriteBitName)
       
  2347 		{
       
  2348 		aValue=KSocketInternalWriteBit;
       
  2349 		}
       
  2350 	else if (aConstantName==KSockWriteSystemMaskName)
       
  2351 		{
       
  2352 		aValue=KSockWriteSystemMask;
       
  2353 		}
       
  2354 	else if (aConstantName==KSockReadPeekName)
       
  2355 		{
       
  2356 		aValue=KSockReadPeek;
       
  2357 		}
       
  2358 	else if (aConstantName==KSocketInternalReadBitName)
       
  2359 		{
       
  2360 		aValue=KSocketInternalReadBit;
       
  2361 		}
       
  2362 	else if (aConstantName==KSockReadContinuationName)
       
  2363 		{
       
  2364 		aValue=KSockReadContinuation;
       
  2365 		}
       
  2366 	else if (aConstantName==KSIConnectionLessName)
       
  2367 		{
       
  2368 		aValue=KSIConnectionLess;
       
  2369 		}
       
  2370 	else if (aConstantName==KSIReliableName)
       
  2371 		{
       
  2372 		aValue=KSIReliable;
       
  2373 		}
       
  2374 	else if (aConstantName==KSIInOrderName)
       
  2375 		{
       
  2376 		aValue=KSIInOrder;
       
  2377 		}
       
  2378 	else if (aConstantName==KSIMessageBasedName)
       
  2379 		{
       
  2380 		aValue=KSIMessageBased;
       
  2381 		}
       
  2382 	else if (aConstantName==KSIDatagramName)
       
  2383 		{
       
  2384 		aValue=KSIDatagram;
       
  2385 		}
       
  2386 	else if (aConstantName==KSIStreamBasedName)
       
  2387 		{
       
  2388 		aValue=KSIStreamBased;
       
  2389 		}
       
  2390 	else if (aConstantName==KSIPseudoStreamName)
       
  2391 		{
       
  2392 		aValue=KSIPseudoStream;
       
  2393 		}
       
  2394 	else if (aConstantName==KSIUrgentDataName)
       
  2395 		{
       
  2396 		aValue=KSIUrgentData;
       
  2397 		}
       
  2398 	else if (aConstantName==KSIConnectDataName)
       
  2399 		{
       
  2400 		aValue=KSIConnectData;
       
  2401 		}
       
  2402 	else if (aConstantName==KSIDisconnectDataName)
       
  2403 		{
       
  2404 		aValue=KSIDisconnectData;
       
  2405 		}
       
  2406 	else if (aConstantName==KSIBroadcastName)
       
  2407 		{
       
  2408 		aValue=KSIBroadcast;
       
  2409 		}
       
  2410 	else if (aConstantName==KSIMultiPointName)
       
  2411 		{
       
  2412 		aValue=KSIMultiPoint;
       
  2413 		}
       
  2414 	else if (aConstantName==KSIQOSName)
       
  2415 		{
       
  2416 		aValue=KSIQOS;
       
  2417 		}
       
  2418 	else if (aConstantName==KSIWriteOnlyName)
       
  2419 		{
       
  2420 		aValue=KSIWriteOnly;
       
  2421 		}
       
  2422 	else if (aConstantName==KSIReadOnlyName)
       
  2423 		{
       
  2424 		aValue=KSIReadOnly;
       
  2425 		}
       
  2426 	else if (aConstantName==KSIGracefulCloseName)
       
  2427 		{
       
  2428 		aValue=KSIGracefulClose;
       
  2429 		}
       
  2430 	else if (aConstantName==KSICanReconnectName)
       
  2431 		{
       
  2432 		aValue=KSICanReconnect;
       
  2433 		}
       
  2434 	else if (aConstantName==KSIPeekDataName)
       
  2435 		{
       
  2436 		aValue=KSIPeekData;
       
  2437 		}
       
  2438 	else if (aConstantName==KSIRequiresOwnerInfoName)
       
  2439 		{
       
  2440 		aValue=KSIRequiresOwnerInfo;
       
  2441 		}
       
  2442 	else if (aConstantName==KNSNameResolutionName)
       
  2443 		{
       
  2444 		aValue=KNSNameResolution;
       
  2445 		}
       
  2446 	else if (aConstantName==KNSHeirarchicalNamingName)
       
  2447 		{
       
  2448 		aValue=KNSHeirarchicalNaming;
       
  2449 		}
       
  2450 	else if (aConstantName==KNSRemoteDiscoveryName)
       
  2451 		{
       
  2452 		aValue=KNSRemoteDiscovery;
       
  2453 		}
       
  2454 	else if (aConstantName==KNSServiceResolutionName)
       
  2455 		{
       
  2456 		aValue=KNSServiceResolution;
       
  2457 		}
       
  2458 	else if (aConstantName==KNSNameRegistrationName)
       
  2459 		{
       
  2460 		aValue=KNSNameRegistration;
       
  2461 		}
       
  2462 	else if (aConstantName==KNSServiceRegistrationName)
       
  2463 		{
       
  2464 		aValue=KNSServiceRegistration;
       
  2465 		}
       
  2466 	else if (aConstantName==KNSDynamicAddressingName)
       
  2467 		{
       
  2468 		aValue=KNSDynamicAddressing;
       
  2469 		}
       
  2470 	else if (aConstantName==KNSInfoDatabaseName)
       
  2471 		{
       
  2472 		aValue=KNSInfoDatabase;
       
  2473 		}
       
  2474 	else if (aConstantName==KNSRequiresConnectionStartupName)
       
  2475 		{
       
  2476 		aValue=KNSRequiresConnectionStartup;
       
  2477 		}
       
  2478 	else if (aConstantName==KSocketNoSecurityName)
       
  2479 		{
       
  2480 		aValue=KSocketNoSecurity;
       
  2481 		}
       
  2482 	else if (aConstantName==KSecureSocketsName)
       
  2483 		{
       
  2484 		aValue=KSecureSockets;
       
  2485 		}
       
  2486 	else if (aConstantName==KSocketMessageSizeIsStreamName)
       
  2487 		{
       
  2488 		aValue=KSocketMessageSizeIsStream;
       
  2489 		}
       
  2490 	else if (aConstantName==KSocketMessageSizeUndefinedName)
       
  2491 		{
       
  2492 		aValue=KSocketMessageSizeUndefined;
       
  2493 		}
       
  2494 	else if (aConstantName==KSocketMessageSizeNoLimitName)
       
  2495 		{
       
  2496 		aValue=KSocketMessageSizeNoLimit;
       
  2497 		}
       
  2498 	else if (aConstantName==KUndefinedSockTypeName)
       
  2499 		{
       
  2500 		aValue=KUndefinedSockType;
       
  2501 		}
       
  2502 	else if (aConstantName==KUndefinedProtocolName)
       
  2503 		{
       
  2504 		aValue=KUndefinedProtocol;
       
  2505 		}
       
  2506 	else if (aConstantName==KErrWouldBlockName)
       
  2507 		{
       
  2508 		aValue=KErrWouldBlock;
       
  2509 		}
       
  2510 	else if (aConstantName==KErrConnectionTerminatedName)
       
  2511 		{
       
  2512 		aValue=KErrConnectionTerminated;
       
  2513 		}
       
  2514 	else if (aConstantName==KErrCannotFindProtocolName)
       
  2515 		{
       
  2516 		aValue=KErrCannotFindProtocol;
       
  2517 		}
       
  2518 	else if (aConstantName==KCOLConnectionName)
       
  2519 		{
       
  2520 		aValue=KCOLConnection;
       
  2521 		}
       
  2522 	else if (aConstantName==KCOLProviderName)
       
  2523 		{
       
  2524 		aValue=KCOLProvider;
       
  2525 		}
       
  2526 	else if (aConstantName==KConnInternalOptionBitName)
       
  2527 		{
       
  2528 		aValue=KConnInternalOptionBit;
       
  2529 		}
       
  2530 	else if (aConstantName==KConnWriteUserDataBitName)
       
  2531 		{
       
  2532 		aValue=KConnWriteUserDataBit;
       
  2533 		}
       
  2534 	else if (aConstantName==KConnReadUserDataBitName)
       
  2535 		{
       
  2536 		aValue=KConnReadUserDataBit;
       
  2537 		}
       
  2538 	else if (aConstantName==KCoEnumerateConnectionClientsName)
       
  2539 		{
       
  2540 		aValue=KCoEnumerateConnectionClients;
       
  2541 		}
       
  2542 	else if (aConstantName==KCoGetConnectionClientInfoName)
       
  2543 		{
       
  2544 		aValue=KCoGetConnectionClientInfo;
       
  2545 		}
       
  2546 	else if (aConstantName==KCoGetConnectionSocketInfoName)
       
  2547 		{
       
  2548 		aValue=KCoGetConnectionSocketInfo;
       
  2549 		}
       
  2550 	else if (aConstantName==KConnectionTypeDefaultName)
       
  2551 		{
       
  2552 		aValue=KConnectionTypeDefault;
       
  2553 		}
       
  2554 	else if (aConstantName==KSubConnParamsInterfaceUidName)
       
  2555 		{
       
  2556 		aValue=KSubConnParamsInterfaceUid;
       
  2557 		}
       
  2558 	else if (aConstantName==KSubConnEventInterfaceUidName)
       
  2559 		{
       
  2560 		aValue=KSubConnEventInterfaceUid;
       
  2561 		}
       
  2562 	else if (aConstantName==KSubConnGenericParamsImplUidName)
       
  2563 		{
       
  2564 		aValue=KSubConnGenericParamsImplUid;
       
  2565 		}
       
  2566 	else if (aConstantName==KSubConnGenericEventsImplUidName)
       
  2567 		{
       
  2568 		aValue=KSubConnGenericEventsImplUid;
       
  2569 		}
       
  2570 	else if (aConstantName==KSubConGlobalFamilyName)
       
  2571 		{
       
  2572 		aValue=KSubConGlobalFamily;
       
  2573 		}
       
  2574 	else if (aConstantName==KSubConQoSFamilyName)
       
  2575 		{
       
  2576 		aValue=KSubConQoSFamily;
       
  2577 		}
       
  2578 	else if (aConstantName==KSubConAuthorisationFamilyName)
       
  2579 		{
       
  2580 		aValue=KSubConAuthorisationFamily;
       
  2581 		}
       
  2582 	else if (aConstantName==KNotificationEventMaxSizeName)
       
  2583 		{
       
  2584 		aValue=KNotificationEventMaxSize;
       
  2585 		}
       
  2586 	else
       
  2587 		{
       
  2588 		ret=EFalse;
       
  2589 		aValue=-1;
       
  2590 		}
       
  2591 
       
  2592 	return ret;
       
  2593 	}
       
  2594 
       
  2595 
       
  2596 TBool CT_BTUtil::ReadAvdtpServiceCategory(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAvdtpServiceCategory& aCategory)
       
  2597 	{
       
  2598 	// Read TAvdtpServiceCategory from ini file
       
  2599 	TPtrC	str;
       
  2600 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2601 	if ( ret )
       
  2602 		{
       
  2603 		if(str == KAvdtpServiceCategoryNull)
       
  2604 			{
       
  2605 			aCategory = EServiceCategoryNull;
       
  2606 			}
       
  2607 		else if(str == KAvdtpServiceCategoryMediaTransport)
       
  2608 			{
       
  2609 			aCategory = EServiceCategoryMediaTransport;
       
  2610 			}
       
  2611 		else if(str == KAvdtpServiceCategoryReporting)
       
  2612 			{
       
  2613 			aCategory = EServiceCategoryReporting;
       
  2614 			}
       
  2615 		else if(str == KAvdtpServiceCategoryRecovery)
       
  2616 			{
       
  2617 			aCategory = EServiceCategoryRecovery;
       
  2618 			}
       
  2619 		else if(str == KAvdtpServiceCategoryContentProtection)
       
  2620 			{
       
  2621 			aCategory = EServiceCategoryContentProtection;
       
  2622 			}
       
  2623 		else if(str == KAvdtpServiceCategoryHeaderCompression)
       
  2624 			{
       
  2625 			aCategory = EServiceCategoryHeaderCompression;
       
  2626 			}
       
  2627 		else if(str == KAvdtpServiceCategoryMultiplexing)
       
  2628 			{
       
  2629 			aCategory = EServiceCategoryMultiplexing;
       
  2630 			}
       
  2631 		else if(str == KAvdtpServiceCategoryMediaCodec)
       
  2632 			{
       
  2633 			aCategory = EServiceCategoryMediaCodec;
       
  2634 			}
       
  2635 		else if(str == KNumberOfAvdtpServiceCategories)
       
  2636 			{
       
  2637 			aCategory = ENumberOfServiceCategories;
       
  2638 			}
       
  2639 		else if(str == KALLAvdtpServiceCategories)
       
  2640 			{
       
  2641 			aCategory = EAllServiceCategories;
       
  2642 			}
       
  2643 		else
       
  2644 			{
       
  2645     	    TInt	intVal=0;
       
  2646         	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2647 			if ( ret )
       
  2648 				{
       
  2649 				aCategory =(TAvdtpServiceCategory)intVal;
       
  2650 				}
       
  2651 			}
       
  2652 		}
       
  2653 	return ret;
       
  2654 	}
       
  2655 
       
  2656 	TBool CT_BTUtil::ReadAvdtpRecoveryType(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TAvdtpRecoveryType& aRecoveryType)
       
  2657 		{
       
  2658 		// Read TAvdtpRecoveryType from ini file
       
  2659 		TPtrC	str;
       
  2660 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2661 		if ( ret )
       
  2662 			{
       
  2663 			if(str == KAvdtpRecoveryTypeEForbidden)
       
  2664 				{
       
  2665 				aRecoveryType = SymbianBluetoothAV::EForbiddenRecovery;
       
  2666 				}
       
  2667 			else if(str == KAvdtpRecoveryTypeERFC2733)
       
  2668 				{
       
  2669 				aRecoveryType = SymbianBluetoothAV::ERFC2733Recovery;
       
  2670 				}
       
  2671 			else
       
  2672 				{
       
  2673 	    	    TInt	intVal=0;
       
  2674 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2675 				if ( ret )
       
  2676 					{
       
  2677 					aRecoveryType = (SymbianBluetoothAV::TAvdtpRecoveryType)intVal;
       
  2678 					}
       
  2679 				}
       
  2680 			}
       
  2681 		return ret;		
       
  2682 		}
       
  2683 	
       
  2684 	TBool CT_BTUtil::ReadAvdtpSignallingErrorCode(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TAvdtpSignallingErrorCode& aErrorCode)
       
  2685 		{
       
  2686 		// Read TAvdtpSignallingErrorCode from ini file
       
  2687 		TPtrC	str;
       
  2688 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2689 		if ( ret )
       
  2690 			{
       
  2691 			if(str == KAvdtpBadHeaderFormat)
       
  2692 				{
       
  2693 				aErrorCode = SymbianBluetoothAV::EAvdtpBadHeaderFormat;
       
  2694 				}
       
  2695 			else if(str == KAvdtpBadLength)
       
  2696 				{
       
  2697 				aErrorCode = SymbianBluetoothAV::EAvdtpBadLength;
       
  2698 				}
       
  2699 			else if(str == KEAvdtpBadACPSEID)
       
  2700 				{
       
  2701 				aErrorCode = SymbianBluetoothAV::EAvdtpBadACPSEID;
       
  2702 				}
       
  2703 			else if(str == KAvdtpSEPInUse)
       
  2704 				{
       
  2705 				aErrorCode = SymbianBluetoothAV::EAvdtpSEPInUse;
       
  2706 				}
       
  2707 			else if(str == KAvdtpSepNotInUse)
       
  2708 				{
       
  2709 				aErrorCode = SymbianBluetoothAV::EAvdtpSepNotInUse;
       
  2710 				}
       
  2711 			else if(str == KAvdtpBadServCategory)
       
  2712 				{
       
  2713 				aErrorCode = SymbianBluetoothAV::EAvdtpBadServCategory;
       
  2714 				}
       
  2715 			else if(str == KAvdtpBadPayloadFormat)
       
  2716 				{
       
  2717 				aErrorCode = SymbianBluetoothAV::EAvdtpBadPayloadFormat;
       
  2718 				}
       
  2719 			else if(str == KAvdtpNotSupportedCommand)
       
  2720 				{
       
  2721 				aErrorCode = SymbianBluetoothAV::EAvdtpNotSupportedCommand;
       
  2722 				}
       
  2723 			else if(str == KAvdtpInvalidCapabilities)
       
  2724 				{
       
  2725 				aErrorCode = SymbianBluetoothAV::EAvdtpInvalidCapabilities;
       
  2726 				}
       
  2727 			else if(str == KAvdtpBadRecoveryType)
       
  2728 				{
       
  2729 				aErrorCode = SymbianBluetoothAV::EAvdtpBadRecoveryType;
       
  2730 				}
       
  2731 			else if(str == KAvdtpBadMediaTransportFormat)
       
  2732 				{
       
  2733 				aErrorCode = SymbianBluetoothAV::EAvdtpBadMediaTransportFormat;
       
  2734 				}
       
  2735 			else if(str == KAvdtpBadReportingFormat)
       
  2736 				{
       
  2737 				aErrorCode = SymbianBluetoothAV::EAvdtpBadReportingFormat;
       
  2738 				}
       
  2739 			else if(str == KAvdtpBadRecoveryFormat)
       
  2740 				{
       
  2741 				aErrorCode = SymbianBluetoothAV::EAvdtpBadRecoveryFormat;
       
  2742 				}
       
  2743 			else if(str == KAvdtpBadRohcFormat)
       
  2744 				{
       
  2745 				aErrorCode = SymbianBluetoothAV::EAvdtpBadRohcFormat;
       
  2746 				}
       
  2747 			else if(str == KAvdtpBadCpFormat)
       
  2748 				{
       
  2749 				aErrorCode = SymbianBluetoothAV::EAvdtpBadCpFormat;
       
  2750 				}
       
  2751 			else if(str == KAvdtpBadMultiplexingFormat)
       
  2752 				{
       
  2753 				aErrorCode = SymbianBluetoothAV::EAvdtpBadMultiplexingFormat;
       
  2754 				}
       
  2755 			else if(str == KAvdtpUnsupportedConfiguration)
       
  2756 				{
       
  2757 				aErrorCode = SymbianBluetoothAV::EAvdtpUnsupportedConfiguration;
       
  2758 				}
       
  2759 			else if(str == KAvdtpBadState)
       
  2760 				{
       
  2761 				aErrorCode = SymbianBluetoothAV::EAvdtpBadState;
       
  2762 				}
       
  2763 			else
       
  2764 				{
       
  2765 	    	    TInt	intVal=0;
       
  2766 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2767 				if ( ret )
       
  2768 					{
       
  2769 					aErrorCode = (SymbianBluetoothAV::TAvdtpSignallingErrorCode)intVal;
       
  2770 					}
       
  2771 				}
       
  2772 			}
       
  2773 		return ret;			
       
  2774 		}
       
  2775 	
       
  2776 	TBool CT_BTUtil::ReadGavdpSignallingErrorCode(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TGavdpSignallingErrorCode& aErrorCode)
       
  2777 		{
       
  2778 		// Read TGavdpSignallingErrorCode from ini file
       
  2779 		TPtrC	str;
       
  2780 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2781 		if ( ret )
       
  2782 			{
       
  2783 			if(str == KGavdpBadService)
       
  2784 				{
       
  2785 				aErrorCode = SymbianBluetoothAV::EGavdpBadService;
       
  2786 				}
       
  2787 			else if(str == KGavdpInsufficientResource)
       
  2788 				{
       
  2789 				aErrorCode = SymbianBluetoothAV::EGavdpInsufficientResource;
       
  2790 				}
       
  2791 			else
       
  2792 				{
       
  2793 	    	    TInt	intVal=0;
       
  2794 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2795 				if ( ret )
       
  2796 					{
       
  2797 					aErrorCode = (SymbianBluetoothAV::TGavdpSignallingErrorCode)intVal;
       
  2798 					}
       
  2799 				}
       
  2800 			}
       
  2801 		return ret;		
       
  2802 		}
       
  2803 	
       
  2804 	TBool CT_BTUtil::ReadA2dpSignallingErrorCode(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TA2dpSignallingErrorCode& aErrorCode)
       
  2805 		{
       
  2806 		// Read TA2dpSignallingErrorCode from ini file
       
  2807 		TPtrC	str;
       
  2808 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2809 		if ( ret )
       
  2810 			{
       
  2811 			if(str == KA2dpInvalidCodec)
       
  2812 				{
       
  2813 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidCodec;
       
  2814 				}
       
  2815 			else if(str == KA2dpNotSupportedCodec)
       
  2816 				{
       
  2817 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedCodec;
       
  2818 				}
       
  2819 			else if(str == KA2dpInvalidSamplingFrequency)
       
  2820 				{
       
  2821 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidSamplingFrequency;
       
  2822 				}
       
  2823 			else if(str == KA2dpNotSupportedSamplingFrequency)
       
  2824 				{
       
  2825 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedSamplingFrequency;
       
  2826 				}
       
  2827 			else if(str == KA2dpInvalidChannelMode)
       
  2828 				{
       
  2829 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidChannelMode;
       
  2830 				}
       
  2831 			else if(str == KA2dpNotSupportedChannelMode)
       
  2832 				{
       
  2833 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedChannelMode;
       
  2834 				}
       
  2835 			else if(str == KA2dpInvalidSubbands)
       
  2836 				{
       
  2837 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidSubbands;
       
  2838 				}
       
  2839 			else if(str == KA2dpNotSupportedSubbands)
       
  2840 				{
       
  2841 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedSubbands;
       
  2842 				}
       
  2843 			else if(str == KA2dpInvalidAllocationMethod)
       
  2844 				{
       
  2845 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidAllocationMethod;
       
  2846 				}
       
  2847 			else if(str == KA2dpNotSupportedAllocationMethod)
       
  2848 				{
       
  2849 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedAllocationMethod;
       
  2850 				}
       
  2851 			else if(str == KA2dpInvalidMinimumBitPoolValue)
       
  2852 				{
       
  2853 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidMinimumBitPoolValue;
       
  2854 				}
       
  2855 			else if(str == KA2dpNotSupportedMinimumBitPoolValue)
       
  2856 				{
       
  2857 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedMinimumBitPoolValue;
       
  2858 				}
       
  2859 			else if(str == KA2dpInvalidMaximumBitPoolValue)
       
  2860 				{
       
  2861 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidMaximumBitPoolValue;
       
  2862 				}
       
  2863 			else if(str == KA2dpNotSupportedMaximumBitPoolValue)
       
  2864 				{
       
  2865 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedMaximumBitPoolValue;
       
  2866 				}
       
  2867 			else if(str == KA2dpInvalidLayer)
       
  2868 				{
       
  2869 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidLayer;
       
  2870 				}
       
  2871 			else if(str == KA2dpNotSupportedLayer)
       
  2872 				{
       
  2873 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedLayer;
       
  2874 				}
       
  2875 			else if(str == KA2dpNotSupportedCRC)
       
  2876 				{
       
  2877 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedCRC;
       
  2878 				}
       
  2879 			else if(str == KA2dpNotSupportedMPF)
       
  2880 				{
       
  2881 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedMPF;
       
  2882 				}
       
  2883 			else if(str == KA2dpNotSupportedVBR)
       
  2884 				{
       
  2885 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedVBR;
       
  2886 				}
       
  2887 			else if(str == KA2dpInvalidBitRate)
       
  2888 				{
       
  2889 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidBitRate;
       
  2890 				}
       
  2891 			else if(str == KA2dpNotSupportedBitRate)
       
  2892 				{
       
  2893 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedBitRate;
       
  2894 				}
       
  2895 			else if(str == KA2dpInvalidObjectType)
       
  2896 				{
       
  2897 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidObjectType;
       
  2898 				}
       
  2899 			else if(str == KA2dpNotSupportedObjectType)
       
  2900 				{
       
  2901 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedObjectType;
       
  2902 				}
       
  2903 			else if(str == KA2dpInvalidChannels)
       
  2904 				{
       
  2905 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidChannels;
       
  2906 				}
       
  2907 			else if(str == KA2dpNotSupportedChannels)
       
  2908 				{
       
  2909 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedChannels;
       
  2910 				}
       
  2911 			else if(str == KA2dpInvalidVersion)
       
  2912 				{
       
  2913 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidVersion;
       
  2914 				}
       
  2915 			else if(str == KA2dpNotSupportedVersion)
       
  2916 				{
       
  2917 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedVersion;
       
  2918 				}
       
  2919 			else if(str == KA2dpNotSupportedSUL)
       
  2920 				{
       
  2921 				aErrorCode = SymbianBluetoothAV::EA2dpNotSupportedSUL;
       
  2922 				}
       
  2923 			else if(str == KA2dpInvalidBlockLength)
       
  2924 				{
       
  2925 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidBlockLength;
       
  2926 				}
       
  2927 			else if(str == KA2dpInvalidCPType)
       
  2928 				{
       
  2929 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidCPType;
       
  2930 				}
       
  2931 			else if(str == KA2dpInvalidCPFormat)
       
  2932 				{
       
  2933 				aErrorCode = SymbianBluetoothAV::EA2dpInvalidCPFormat;
       
  2934 				}
       
  2935 			else
       
  2936 				{
       
  2937 	    	    TInt	intVal=0;
       
  2938 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2939 				if ( ret )
       
  2940 					{
       
  2941 					aErrorCode = (SymbianBluetoothAV::TA2dpSignallingErrorCode)intVal;
       
  2942 					}
       
  2943 				}
       
  2944 			}
       
  2945 		return ret;		
       
  2946 		}
       
  2947 	
       
  2948 	TBool CT_BTUtil::ReadVdpSignallingErrorCode(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TVdpSignallingErrorCode& aErrorCode)
       
  2949 		{
       
  2950 		// Read TVdpSignallingErrorCode from ini file
       
  2951 		TPtrC	str;
       
  2952 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2953 		if ( ret )
       
  2954 			{
       
  2955 			if(str == KVdpInvalidCodecType)
       
  2956 				{
       
  2957 				aErrorCode = SymbianBluetoothAV::EVdpInvalidCodecType;
       
  2958 				}
       
  2959 			else if(str == KVdpNotSupportedCodecType)
       
  2960 				{
       
  2961 				aErrorCode = SymbianBluetoothAV::EVdpNotSupportedCodecType;
       
  2962 				}
       
  2963 			else if(str == KVdpInvalidLevel)
       
  2964 				{
       
  2965 				aErrorCode = SymbianBluetoothAV::EVdpInvalidLevel;
       
  2966 				}
       
  2967 			else if(str == KVdpNotSupportedLevel)
       
  2968 				{
       
  2969 				aErrorCode = SymbianBluetoothAV::EVdpNotSupportedLevel;
       
  2970 				}
       
  2971 			else if(str == KVdpInvalidCPType)
       
  2972 				{
       
  2973 				aErrorCode = SymbianBluetoothAV::EVdpInvalidCPType;
       
  2974 				}
       
  2975 			else if(str == KVdpInvalidCPFormat)
       
  2976 				{
       
  2977 				aErrorCode = SymbianBluetoothAV::EVdpInvalidCPFormat;
       
  2978 				}
       
  2979 			else
       
  2980 				{
       
  2981 	    	    TInt	intVal=0;
       
  2982 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  2983 				if ( ret )
       
  2984 					{
       
  2985 					aErrorCode = (SymbianBluetoothAV::TVdpSignallingErrorCode)intVal;
       
  2986 					}
       
  2987 				}
       
  2988 			}
       
  2989 		return ret;		
       
  2990 		}
       
  2991 	
       
  2992 	TBool CT_BTUtil::ReadBluetoothMediaType(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, SymbianBluetoothAV::TBluetoothMediaType& aMediaType)
       
  2993 		{
       
  2994 		// Read TBluetoothMediaType from ini file
       
  2995 		TPtrC	str;
       
  2996 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  2997 		if ( ret )
       
  2998 			{
       
  2999 			if(str == KAvdtpMediaTypeAudio)
       
  3000 				{
       
  3001 				aMediaType = SymbianBluetoothAV::EAvdtpMediaTypeAudio;
       
  3002 				}
       
  3003 			else if(str == KAvdtpMediaTypeVideo)
       
  3004 				{
       
  3005 				aMediaType = SymbianBluetoothAV::EAvdtpMediaTypeVideo;
       
  3006 				}
       
  3007 			else if(str == KAvdtpMediaTypeMultimedia)
       
  3008 				{
       
  3009 				aMediaType = SymbianBluetoothAV::EAvdtpMediaTypeMultimedia;
       
  3010 				}
       
  3011 			else
       
  3012 				{
       
  3013 	    	    TInt	intVal=0;
       
  3014 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  3015 				if ( ret )
       
  3016 					{
       
  3017 					aMediaType = (SymbianBluetoothAV::TBluetoothMediaType)intVal;
       
  3018 					}
       
  3019 				}
       
  3020 			}
       
  3021 		return ret;				
       
  3022 		}
       
  3023 
       
  3024 	TBool CT_BTUtil::ReadAvdtpTransportSessionType(CDataWrapper& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAvdtpTransportSessionType& aSessionType)
       
  3025 		{
       
  3026 		// Read TAvdtpTransportSessionType from ini file
       
  3027 		TPtrC	str;
       
  3028 		TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, str);
       
  3029 		if ( ret )
       
  3030 			{
       
  3031 			if(str == KMedia)
       
  3032 				{
       
  3033 				aSessionType = EMedia;
       
  3034 				}
       
  3035 			else if(str == KReporting)
       
  3036 				{
       
  3037 				aSessionType = EReporting;
       
  3038 				}
       
  3039 			else if(str == KRecovery)
       
  3040 				{
       
  3041 				aSessionType = ERecovery;
       
  3042 				}
       
  3043 			else if(str == KSignalling)
       
  3044 				{
       
  3045 				aSessionType = ESignalling;
       
  3046 				}
       
  3047 			else if(str == KNumStreamTypes)
       
  3048 				{
       
  3049 				aSessionType = ENumStreamTypes;
       
  3050 				}
       
  3051 			else
       
  3052 				{
       
  3053 	    	    TInt	intVal=0;
       
  3054 	        	ret=aDataWrapper.GetIntFromConfig(aSectName, aKeyName, intVal);
       
  3055 				if ( ret )
       
  3056 					{
       
  3057 					aSessionType = (TAvdtpTransportSessionType)intVal;
       
  3058 					}
       
  3059 				}
       
  3060 			}
       
  3061 		return ret;		
       
  3062 		}
       
  3063 
       
  3064 /**
       
  3065  * Utility method that fetches MGavdpUser pointer by command parameter name from INI-file.
       
  3066  */
       
  3067 TBool CT_BTUtil::GetGavdpUserL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, MGavdpUser*& aData)
       
  3068 	{	
       
  3069 	// get MGavdpUser data object from parameters
       
  3070 	TPtrC	name;
       
  3071 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3072 	if ( ret )
       
  3073 		{
       
  3074 		// Data object found
       
  3075 		aData=static_cast<MGavdpUser*>(aDataWrapper.GetDataObjectL(name));
       
  3076 		}
       
  3077 
       
  3078 	return ret;
       
  3079 	}
       
  3080 
       
  3081 /**
       
  3082  * Utility method that fetches RSocketServ pointer by command parameter name from INI-file.
       
  3083  */
       
  3084 TBool CT_BTUtil::GetSocketServL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, RSocketServ*& aData)
       
  3085 	{	
       
  3086 	// get RSocketServ data object from parameters
       
  3087 	TPtrC	name;
       
  3088 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3089 	if ( ret )
       
  3090 		{
       
  3091 		// Data object found
       
  3092 		aData=static_cast<RSocketServ*>(aDataWrapper.GetDataObjectL(name));
       
  3093 		}
       
  3094 
       
  3095 	return ret;
       
  3096 	}
       
  3097 
       
  3098 /**
       
  3099  * Utility method that fetches TSEID pointer by command parameter name from INI-file.
       
  3100  */
       
  3101 TBool CT_BTUtil::GetSEIDL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TSEID*& aData)
       
  3102 	{	
       
  3103 	// get TSEID data object from parameters
       
  3104 	TPtrC	name;
       
  3105 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3106 	if ( ret )
       
  3107 		{
       
  3108 		// Data object found
       
  3109 		aData=static_cast<TSEID*>(aDataWrapper.GetDataObjectL(name));
       
  3110 		}
       
  3111 
       
  3112 	return ret;
       
  3113 	}
       
  3114 
       
  3115 /**
       
  3116  * Utility method that fetches TAvdtpServiceCategories pointer by command parameter name from INI-file.
       
  3117  */
       
  3118 TBool CT_BTUtil::GetAvdtpServiceCategoriesL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAvdtpServiceCategories*& aData)
       
  3119 	{	
       
  3120 	// get TAvdtpServiceCategories data object from parameters
       
  3121 	TPtrC	name;
       
  3122 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3123 	if ( ret )
       
  3124 		{
       
  3125 		// Data object found
       
  3126 		aData=static_cast<TAvdtpServiceCategories*>(aDataWrapper.GetDataObjectL(name));
       
  3127 		}
       
  3128 
       
  3129 	return ret;
       
  3130 	}
       
  3131 
       
  3132 /**
       
  3133  * Utility method that fetches TAvdtpSEPInfo pointer by command parameter name from INI-file.
       
  3134  */
       
  3135 TBool CT_BTUtil::GetAvdtpSEPInfoL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAvdtpSEPInfo*& aData)
       
  3136 	{	
       
  3137 	// get TAvdtpSEPInfo data object from parameters
       
  3138 	TPtrC	name;
       
  3139 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3140 	if ( ret )
       
  3141 		{
       
  3142 		// Data object found
       
  3143 		aData=static_cast<TAvdtpSEPInfo*>(aDataWrapper.GetDataObjectL(name));
       
  3144 		}
       
  3145 
       
  3146 	return ret;
       
  3147 	}
       
  3148 
       
  3149 /**
       
  3150  * Utility method that fetches TAvdtpServiceCapability pointer by command parameter name from INI-file.
       
  3151  */
       
  3152 TBool CT_BTUtil::GetAvdtpServiceCapabilityL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TAvdtpServiceCapability*& aData)
       
  3153 	{	
       
  3154 	// get TAvdtpServiceCapability data object from parameters
       
  3155 	TPtrC	name;
       
  3156 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3157 	if ( ret )
       
  3158 		{
       
  3159 		// Data object found
       
  3160 		aData=static_cast<TAvdtpServiceCapability*>(aDataWrapper.GetDataObjectL(name));
       
  3161 		}
       
  3162 
       
  3163 	return ret;
       
  3164 	}
       
  3165 
       
  3166 /**
       
  3167  * Utility method that fetches TBTDevAddr pointer by command parameter name from INI-file.
       
  3168  */
       
  3169 TBool CT_BTUtil::GetBTDevAddrL(CDataWrapperBase& aDataWrapper, const TDesC& aSectName, const TDesC& aKeyName, TBTDevAddr*& aData)
       
  3170 	{
       
  3171 	// get TBTDevAddr data object from parameters
       
  3172 	TPtrC	name;
       
  3173 	TBool	ret=aDataWrapper.GetStringFromConfig(aSectName, aKeyName, name);
       
  3174 	if ( ret )
       
  3175 		{
       
  3176 		// Data object found
       
  3177 		aData=static_cast<TBTDevAddr*>(aDataWrapper.GetDataObjectL(name));
       
  3178 		}
       
  3179 
       
  3180 	return ret;	
       
  3181 	}