epoc32/include/bttypes.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 // BT protocol wide types
    15 // 
    16 //
    17 
    18 #ifndef _BTTYPES_H
    19 #define _BTTYPES_H
    20 
    21 #include <e32std.h>
    22 #include <bluetooth/eirdatacodec.h>
    23 
    24 /**
    25 @publishedAll
    26 @released
    27 
    28 Minimum eSCO connection latency in milliseconds.  Attempts to specify less than this will be silently
    29 increased to this level.
    30 */
    31 static const TInt KMinESCOLatency = 4;
    32 
    33 /**
    34 @publishedAll
    35 @released
    36 
    37 Typedef to represent a HCI connection handle.
    38 */
    39 typedef TUint16 THCIConnHandle;
    40 
    41 /**
    42 @publishedAll
    43 @released
    44 
    45 Bluetooth SIG specified values for specification of (piconet) role.
    46 */
    47 enum TBTBasebandRole
    48 	{
    49 	EMaster			= 0x00, /*!< Master role */
    50 	ESlave			= 0x01, /*!< Slave role */
    51 	ERoleUnknown,			/*!< Unknown role */
    52 	};
    53 
    54 /**
    55 @publishedAll
    56 @released
    57 
    58 Bluetooth SIG specified values for indicating link modes.
    59 */
    60 enum TBTLinkMode
    61     {
    62     EActiveMode		= 0x00, /*!< Active mode */
    63     EHoldMode		= 0x01, /*!< Hold mode */
    64     ESniffMode		= 0x02, /*!< Sniff mode */
    65     EParkMode		= 0x04, /*!< Park mode */
    66 	EScatterMode	= 0x08, /*!< Scatter mode */
    67     };
    68 
    69 /**
    70 @publishedAll
    71 @released
    72 
    73 Typedef to represent a union of TBTLinkMode values.
    74 */
    75 typedef TUint32 TBTLinkModeSet;
    76 
    77 /**
    78 @publishedAll
    79 @released
    80 
    81 Bitmask values to help request combinations of link modes.
    82 @see TBTLinkMode
    83 */
    84 enum TBTLinkModeCombinations
    85 	{
    86 	EAnyLowPowerMode = (EHoldMode | ESniffMode | EParkMode | EScatterMode) /*!< Any low power mode */
    87 	};
    88 
    89 /**
    90 @publishedAll
    91 @released
    92 
    93 Bluetooth SIG specified values for indicating packet types.
    94 
    95 DM1, DH1, DM3, DH3, DM5, DH5 are ACL packet types
    96 HV1, HV2, HV3 are SCO (synchronous link) packet types
    97 */
    98 enum TBTPacketType
    99 	{
   100 	EPacketsDM1			= 0x0008, /*!< DM1 ACL packet type */
   101 	EPacketsDH1			= 0x0010, /*!< DH1 ACL packet type */
   102 	EPacketsDM3			= 0x0400, /*!< DM3 ACL packet type */
   103 	EPacketsDH3			= 0x0800, /*!< DH3 ACL packet type */
   104 	EPacketsDM5			= 0x4000, /*!< DM5 ACL packet type */
   105 	EPacketsDH5			= 0x8000, /*!< DH5 ACL packet type */
   106 	
   107 	EPackets2_DH1		= 0x0002, /*!< 2-DH1 ACL packet type */
   108 	EPackets3_DH1		= 0x0004, /*!< 3-DH1 ACL packet type */
   109 	EPackets2_DH3		= 0x0100, /*!< 2-DH3 ACL packet type */
   110 	EPackets3_DH3		= 0x0200, /*!< 3-DH3 ACL packet type */
   111 	EPackets2_DH5		= 0x1000, /*!< 2-DH5 ACL packet type */
   112 	EPackets3_DH5		= 0x2000, /*!< 3-DH5 ACL packet type */
   113 
   114 	EPacketsHV1			= 0x0020, /*!< HV1 SCO packet type */
   115 	EPacketsHV2			= 0x0040, /*!< HV2 SCO packet type */
   116 	EPacketsHV3			= 0x0080, /*!< HV3 SCO packet type */
   117 	};
   118 
   119 /**
   120 @publishedAll
   121 @released
   122 
   123 Typedef to represent a set of SCO packet types.
   124 */
   125 typedef TUint16 TBTSCOPackets;
   126 
   127 /**
   128 @publishedAll
   129 @released
   130 
   131 Typedef to represent a set of ACL packet types.
   132 */
   133 typedef TUint16 TBTACLPackets;
   134 
   135 /**
   136 @publishedAll
   137 @released
   138 
   139 Bitmask values to help request combinations of packets.
   140 @see TBTPacketType
   141 */
   142 enum TBTPacketTypeCombinations
   143 	{
   144 	EAnyACLPacket	 = EPacketsDM1 | EPacketsDM3 | EPacketsDM5 | EPacketsDH1 | EPacketsDH3 | EPacketsDH5, /*!< Any ACL packet */
   145 	EAnyNonEdrACLPacket = EAnyACLPacket | EPackets2_DH1 | EPackets3_DH1 | EPackets2_DH3 | EPackets3_DH3 | EPackets2_DH5 | EPackets3_DH5, /*!< Any Non-EDR ACL packet */
   146 	EAnySCOPacket	 = EPacketsHV1 | EPacketsHV2 | EPacketsHV3, /*!< Any SCO packet */
   147 	EAnyPacket		= EAnyACLPacket | EAnySCOPacket  /*!< Any packet */
   148 	};
   149 
   150 
   151 /**
   152 @publishedAll
   153 @released
   154 
   155 Typedef to represent a set of synchronous packet types (SCO and eSCO on v1.2).
   156 @see TBTSyncPackets::TSyncPackets
   157 */
   158 typedef TUint32 TBTSyncPacketTypes;
   159 
   160 /**
   161 @publishedAll
   162 @deprecated
   163 
   164 This constant is no longer needed to translate the SCO mapping of HV packet types to Synchronous
   165 because CBluetoothSynchronousLink::SetupConnection(const TBTDevAddr& aBDAddr, const TUint16 aPacketTypes)
   166 adjusts aPacketTypes internally on behalf of clients.
   167 */
   168 static const TInt KSCOvsSyncHVOffset = 5;
   169 
   170 /**
   171 @publishedAll
   172 @released
   173 
   174 Class to represent a set of synchronous packet types (SCO and eSCO on v1.2).
   175 This differs from TBTSyncPacketTypes as it is the interface used by CBluetoothSynchronousLink
   176 in order to detect the difference between a pre and post eSCO caller.  This is necessary
   177 as HV1 packets in the SCO numbering clash with EV5 packets in the sync numbering.
   178 */
   179 NONSHARABLE_CLASS(TBTSyncPackets)
   180 	{
   181 	public:
   182 		/**
   183 		@publishedAll
   184 		@released
   185 		
   186 		Individual synchronous packet types.
   187 		@see TBTSyncPacketTypes
   188 		*/
   189 		enum TSyncPackets
   190 			{
   191 			ESyncPacketsHV1		= 0x10001,
   192 			ESyncPacketsHV2		= 0x10002,
   193 			ESyncPacketsHV3		= 0x10004,
   194 
   195 			ESyncPacketsEV3		= 0x20008,
   196 			ESyncPacketsEV4		= 0x20010,
   197 			ESyncPacketsEV5		= 0x20020,
   198 			
   199 			ESyncAnySCOPacket	= ESyncPacketsHV1 | ESyncPacketsHV2 | ESyncPacketsHV3,
   200 			ESyncAnyESCOPacket	= ESyncPacketsEV3 | ESyncPacketsEV4 | ESyncPacketsEV5
   201 			};
   202 	
   203 	public:
   204 		IMPORT_C explicit TBTSyncPackets(TBTSyncPacketTypes aPackets);
   205 		IMPORT_C TBTSyncPacketTypes operator()() const;
   206 		
   207 	private:
   208 		TUint32 iPacketTypes;
   209 
   210 		// This data padding has been added to help prevent future binary compatibility breaks	
   211 		// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
   212 		TUint32     iPadding1; 
   213 		TUint32     iPadding2; 		
   214 	};
   215 
   216 
   217 /**
   218 @publishedAll
   219 @released
   220 
   221 eSCO links can have different retransmission options, optimised for link usage,
   222 power or reliability.
   223 
   224 @see CBluetoothSynchronousLink::SetRetransmissionEffort
   225 */
   226 enum TBTeSCORetransmissionTypes
   227 	{
   228 	EeSCORetransmitNone			= 0,
   229 	EeSCORetransmitPower		= 1,
   230 	EeSCORetransmitReliability	= 2,
   231 	EeSCORetransmitDontCare		= 0xff
   232 	};
   233 
   234 /**
   235 @publishedAll
   236 @released
   237 
   238 eSCO unspecified bandwidth.  This value can only be used by the accepting side
   239 of an eSCO link, to allow any bandwidth to be specified by the initiator.
   240 Otherwise both sides of the link must agree on the same bandwidth.
   241 
   242 @see CBluetoothSynchronousLink::SetBandwidth
   243 @see CBluetoothSynchronousLink::AcceptConnection
   244 */
   245 static const TUint32 KESCOBandwidthDontCare = KMaxTUint32;
   246 
   247 /**
   248 @internalTechnology
   249 
   250 Bit positions of the individual local and remote features.
   251 @see TBTFeatures
   252 */
   253 enum TBTSupportedFeaturesBits
   254 	{
   255 	ESupportedThreeSlotPacketsBit				= 0,  /*!< Three slot packets are supported */
   256 	ESupportedFiveSlotPacketsBit				= 1,  /*!< Five slot packets are supported */
   257 	ESupportedEncryptionBit						= 2,  /*!< Encryption is supported */
   258 	ESupportedSlotOffsetBit						= 3,  /*!< Slot offset is supported */
   259 	ESupportedTimingAccuracyBit					= 4,  /*!< Timing accuracy is supported */
   260 	ESupportedSwitchBit							= 5,  /*!< Role switch is supported */
   261 	ESupportedHoldModeBit						= 6,  /*!< Hold mode is supported */
   262 	ESupportedSniffModeBit						= 7,  /*!< Sniff mode is supported */
   263 	ESupportedParkModeBit						= 8,  /*!< Park mode is supported */
   264 	ESupportedRSSIBit							= 9,  /*!< Receive signal strength indication is supported */
   265 	ESupportedChannelQualityDrivenDataRateBit	= 10, /*!< Channel quality driven data rate is supported */
   266 	ESupportedSCOLinkBit						= 11, /*!< SCO links are supported */
   267 	ESupportedHV2PacketsBit						= 12, /*!< HV2 packets are supported */
   268 	ESupportedHV3PacketsBit						= 13, /*!< HV3 packets are supported */
   269 	ESupportedu_lawLogBit						= 14, /*!< SCO u-law encoding is supported */
   270 	ESupportedA_lawLogBit						= 15, /*!< SCO A-law encoding is supported */
   271 	ESupportedCVSDBit							= 16, /*!< SCO Continuously variable slope delta modulation is supported */
   272 	ESupportedPagingSchemeBit					= 17, /*!< Paging scheme is supported */
   273 	ESupportedPowerControlBit					= 18, /*!< Power control is supported */
   274 	ESupportedTransparentSCODataBit				= 19, /*!< Transparent SCO data is supported */
   275 	ESupportedFlowControlLagBit0Bit				= 20, /*!< Flow control lag bit 0 is supported */
   276 	ESupportedFlowControlLagBit1Bit				= 21, /*!< Flow control lag bit 1 is supported */
   277 	ESupportedFlowControlLagBit2Bit				= 22, /*!< Flow control lag bit 2 is supported */
   278 	ESupportedBroadcastEncryptionBit			= 23, /*!< Broadcast encryption is supported */
   279 	
   280 	EEDR_ACL_2MbpsModeBit						= 25, /*!< 2Mbps EDR ACL supported */
   281 	EEDR_ACL_3MbpsModeBit						= 26, /*!< 3Mbps EDR ACL supported */
   282 	ESupportedEnhancedEnquiryScanBit			= 27, /*!< Enhanced enquiry scan is supported */
   283 	ESupportedInterlacedEnquiryScanBit			= 28, /*!< Interlaced enquiry scan is supported */
   284 	ESupportedInterlacedPageScanBit				= 29, /*!< Interlaced page scan is supported */
   285 	ESupportedRSSIWithInquiryResultsBit			= 30, /*!< Read signal strength indication with inquiry is supported */
   286 	ESupportedExtendedSCOLinkBit				= 31, /*!< Extended SCO links are supported */
   287 	ESupportedEV4PacketsBit						= 32, /*!< EV4 packets are supported */
   288 	ESupportedEV5PacketsBit						= 33, /*!< EV5 packets are supported */
   289 	
   290 	ESupportedAFHCapableSlaveBit				= 35, /*!< Adaptive frequency hopping in slave role is supported */
   291 	ESupportedAFHClassificationSlaveBit			= 36, /*!< Adaptive frequency hopping classification in slave role is supported */
   292 
   293 	ESupportedEDRThreeSlotPacketsBit			= 39, /*!< Three slot EDR packets are supported */
   294 	ESupportedEDRFiveSlotPacketsBit				= 40, /*!< Five slot EDR packets are supported */
   295 	ESupportedSniffSubratingBit					= 41, /*!< Sniff subrating is supported */
   296 	ESupportedEncryptionPauseResumeBit			= 42, /*!< Encryption Pause and Resume is supported */
   297 	ESupportedAFHCapableMasterBit				= 43, /*!< Adaptive frequency hopping in master role is supported */
   298 	ESupportedAFHClassificationMasterBit		= 44, /*!< Adaptive frequency hopping classification in master role is supported */
   299 	EEDR_eSCO_2MbpsModeBit						= 45, /*!< 2Mbps EDR eSCO supported */
   300 	EEDR_eSCO_3MbpsModeBit						= 46, /*!< 3Mbps EDR eSCO supported */
   301 	ESupportedEDReSCOThreeSlotPacketsBit		= 47, /*!< Three slot EDR eSCO packets are supported */
   302 	ESupportedExtendedInquiryResponseBit		= 48, /*!< Extended Inquiry Response */
   303 	
   304 	ESupportedSecureSimplePairingBit			= 51, /*!< Secure Simple Pairing */
   305 	ESupportedEncapsulatedPDUBit				= 52, /*!< Encapsulated PDU */
   306 	ESupportedErroneousDataReportingBit			= 53, /*!< Erroneous Data Reporting */
   307 	ESupportedNonflushablePacketBoundaryFlagBit	= 54, /*!< Non-flushable Packet Boundary Flag */
   308 	
   309 	ESupportedLinkSupervisionTimeoutChangedEventBit	= 56, /*!< Link Supervision Timeout Changed Event */
   310 	ESupportedInquiryResponseTXPowerLevelBit	= 57, /*!< Inquiry Response TX Power Level */
   311 	
   312 	ESupportedExtendedFeaturesBit				= 63, /*!< Additional features are supported */
   313 	};
   314 
   315 /**
   316 @internalTechnology
   317 
   318 Bit positions of the individual local supported HCI commands.
   319 @see TBluetoothHciCommands
   320 */
   321 enum TBluetoothSupportedCommandsBits
   322 	{
   323 	ESupportedInquiryCommand								= 0, /*!< Inquiry command is supported */
   324 	ESupportedInquiryCancelCommand							= 1, /*!< Inquiry Cancel command is supported */
   325 	ESupportedPeriodicInquiryModeCommand					= 2, /*!< Periodic Inquiry Mode command is supported */
   326 	ESupportedExitPeriodicInquiryModeCommand				= 3, /*!< Exit Periodic Inquiry Mode command is supported */
   327 	ESupportedCreateConnectionCommand						= 4, /*!< Create Connection command is supported */
   328 	ESupportedDisconnectCommand								= 5, /*!< Disconnect command is supported */
   329 	ESupportedAddSCOConnectionCommand						= 6, /*!< Add SCO Connection command is supported */
   330 	ESupportedCancelCreateConnectionCommand					= 7, /*!< Cancel Create Connection command is supported */
   331 	ESupportedAcceptConnectionRequestCommand				= 8, /*!< Accept Connection Request command is supported */
   332 	ESupportedRejectConnectionRequestCommand				= 9, /*!< Reject Connection Request command is supported */
   333 	ESupportedLinkKeyRequestReplyCommand					= 10, /*!< Link Key Request Reply command is supported */
   334 	ESupportedLinkKeyRequestNegativeReplyCommand			= 11, /*!< Link Key Request Negative Reply command is supported */
   335 	ESupportedPINCodeRequestReplyCommand					= 12, /*!< PIN Code Request Reply command is supported */
   336 	ESupportedPINCodeRequestNegativeReplyCommand			= 13, /*!< PIN Code Request Negative Reply command is supported */
   337 	ESupportedChangeConnectionPacketTypeCommand				= 14, /*!< Change Connection Packet Type command is supported */
   338 	ESupportedAuthenticationRequestCommand					= 15, /*!< Authentication Request command is supported */
   339 	ESupportedSetConnectionEncryptionCommand				= 16, /*!< Set Connection Encryption command is supported */
   340 	ESupportedChangeConnectionLinkKeyCommand				= 17, /*!< Change Connection Link Key command is supported */
   341 	ESupportedMasterLinkKeyCommand							= 18, /*!< Master Link Key command is supported */
   342 	ESupportedRemoteNameRequestCommand						= 19, /*!< Remote Name Request command is supported */
   343 	ESupportedCancelRemoteNameRequestCommand				= 20, /*!< Cancel Remote Name Request command is supported */
   344 	ESupportedReadRemoteSupportedFeaturesCommand			= 21, /*!< Read Remote Supported Features command is supported */
   345 	ESupportedReadRemoteExtendedFeaturesCommand				= 22, /*!< Read Remote Extended Features command is supported */
   346 	ESupportedReadRemoteVersionInformationCommand			= 23, /*!< Read Remote Version Information command is supported */
   347 	ESupportedReadClockOffsetCommand						= 24, /*!< Read Clock Offset command is supported */
   348 	ESupportedReadLMPHandleCommand							= 25, /*!< Read LMP Handle command is supported */
   349 	ESupportedHoldModeCommand								= 33, /*!< Hold Mode command is supported */
   350 	ESupportedSniffModeCommand								= 34, /*!< Sniff Mode command is supported */
   351 	ESupportedExitSniffModeCommand							= 35, /*!< Exit Sniff Mode command is supported */
   352 	ESupportedParkStateCommand								= 36, /*!< Park State command is supported */
   353 	ESupportedExitParkStateCommand							= 37, /*!< Exit Park State command is supported */
   354 	ESupportedQoSSetupCommand								= 38, /*!< QoS Setup command is supported */
   355 	ESupportedRoleDiscoveryCommand							= 39, /*!< Role Discovery command is supported */
   356 	ESupportedSwitchRoleCommand								= 40, /*!< Switch Role command is supported */
   357 	ESupportedReadLinkPolicySettingsCommand					= 41, /*!< Read Link Policy Settings command is supported */
   358 	ESupportedWriteLinkPolicySettingsCommand				= 42, /*!< Write Link Policy Settings command is supported */
   359 	ESupportedReadDefaultLinkPolicySettingsCommand			= 43, /*!< Read Default Link Policy Settings command is supported */
   360 	ESupportedWriteDefaultLinkPolicySettingsCommand			= 44, /*!< Write Default Link Policy Settings command is supported */
   361 	ESupportedFlowSpecificationCommand						= 45, /*!< Flow Specification command is supported */
   362 	ESupportedSetEventMarkCommand							= 46, /*!< Set Event Mark command is supported */
   363 	ESupportedResetCommand									= 47, /*!< Reset command is supported */
   364 	ESupportedSetEventFilterCommand							= 48, /*!< Set Event Filter command is supported */
   365 	ESupportedFlushCommand									= 49, /*!< Flush command is supported */
   366 	ESupportedReadPINTypeCommand							= 50, /*!< Read PIN Type command is supported */
   367 	ESupportedWritePINTypeCommand							= 51, /*!< Write PIN Type command is supported */
   368 	ESupportedCreateNewUnitKeyCommand						= 52, /*!< Create New Unit Key command is supported */
   369 	ESupportedReadStoredLinkKeyCommand						= 53, /*!< Read Stored Link Key command is supported */
   370 	ESupportedWriteStoredLinkKeyCommand						= 54, /*!< Write Stored Link Key command is supported */
   371 	ESupportedDeleteStoredLinkKeyCommand					= 55, /*!< Delete Stored Link Key command is supported */
   372 	ESupportedWriteLocalNameCommand							= 56, /*!< Write Local Name command is supported */
   373 	ESupportedReadLocalNameCommand							= 57, /*!< Read Local Name command is supported */
   374 	ESupportedReadConnectionAcceptTimeoutCommand			= 58, /*!< Read Connection Accept Timeout command is supported */
   375 	ESupportedWriteConnectionAcceptTimeoutCommand			= 59, /*!< Write Connection Accept Timeout command is supported */
   376 	ESupportedReadPageTimeoutCommand						= 60, /*!< Read Page Timeout command is supported */
   377 	ESupportedWritePageTimeoutCommand						= 61, /*!< Write Page Timeout command is supported */
   378 	ESupportedReadScanEnableCommand							= 62, /*!< Read Scan Enable command is supported */
   379 	ESupportedWriteScanEnableCommand						= 63, /*!< Write Scan Enable command is supported */
   380 	ESupportedReadPageScanActivityCommand					= 64, /*!< Read Page Scan Activity command is supported */
   381 	ESupportedWritePageScanActivityCommand					= 65, /*!< Write Page Scan Activity command is supported */
   382 	ESupportedReadInquiryScanActivityCommand				= 66, /*!< Read Inquiry Scan Activity command is supported */
   383 	ESupportedWriteInquiryScanActivityCommand				= 67, /*!< Write Inquiry Scan Activity command is supported */
   384 	ESupportedReadClassOfDeviceCommand						= 72, /*!< Read Class Of Device command is supported */
   385 	ESupportedWriteClassOfDeviceCommand						= 73, /*!< Write Class Of Device command is supported */
   386 	ESupportedReadVoiceSettingCommand						= 74, /*!< Read Voice Setting command is supported */
   387 	ESupportedWriteVoiceSettingCommand						= 75, /*!< Write Voice Setting command is supported */
   388 	ESupportedReadAutomaticFlushTimeoutCommand				= 76, /*!< Read Automatic Flush Timeout command is supported */
   389 	ESupportedWriteAutomaticFlushTimeoutCommand				= 77, /*!< Write Automatic Flush Timeout command is supported */
   390 	ESupportedReadNumBroadcastRetransmissionsCommand		= 78, /*!< Read Num Broadcast Retransmissions command is supported */
   391 	ESupportedWriteNumBroadcastRetransmissionsCommand		= 79, /*!< Write Num Broadcast Retransmissions command is supported */
   392 	ESupportedReadHoldModeActivityCommand					= 80, /*!< Read Hold Mode Activity command is supported */
   393 	ESupportedWriteHoldModeActivityCommand					= 81, /*!< Write Hold Mode Activity command is supported */
   394 	ESupportedReadTransmitPowerLevelCommand					= 82, /*!< Read Transmit Power Level command is supported */
   395 	ESupportedReadSynchronousFlowControlEnableCommand		= 83, /*!< Read Synchronous Flow Control Enable command is supported */
   396 	ESupportedWriteSynchronousFlowControlEnableCommand		= 84, /*!< Write Synchronous Flow Control Enable command is supported */
   397 	ESupportedSetHostControllerToHostFlowControlCommand		= 85, /*!< Set Host Controller To Host Flow Control command is supported */
   398 	ESupportedHostBufferSizeCommand							= 86, /*!< Host Buffer Size command is supported */
   399 	ESupportedHostNumberOfCompletedPacketsCommand			= 87, /*!< Host Number Of Completed Packets command is supported */
   400 	ESupportedReadLinkSupervisionTimeoutCommand				= 88, /*!< Read Link Supervision Timeout command is supported */
   401 	ESupportedWriteLinkSupervisionTimeoutCommand			= 89, /*!< Write Link Supervision Timeout command is supported */
   402 	ESupportedReadNumberofSupportedIACCommand				= 90, /*!< Read Number of Supported IAC command is supported */
   403 	ESupportedReadCurrentIACLAPCommand						= 91, /*!< Read Current IAC LAP command is supported */
   404 	ESupportedWriteCurrentIACLAPCommand						= 92, /*!< Write Current IAC LAP command is supported */
   405 	ESupportedReadPageScanModeCommand						= 95, /*!< Read Page Scan Mode command is supported */
   406 	ESupportedWritePageScanModeCommand						= 96, /*!< Write Page Scan Mode command is supported */
   407 	ESupportedSetAFHChannelClassificationCommand			= 97, /*!< Set AFH Channel Classification command is supported */
   408 	ESupportedReadInquiryScanTypeCommand					= 100, /*!< Read Inquiry Scan Type command is supported */
   409 	ESupportedWriteInquiryScanTypeCommand					= 101, /*!< Write Inquiry Scan Type command is supported */
   410 	ESupportedReadInquiryModeCommand						= 102, /*!< Read Inquiry Mode command is supported */
   411 	ESupportedWriteInquiryModeCommand						= 103, /*!< Write Inquiry Mode command is supported */
   412 	ESupportedReadPageScanTypeCommand						= 104, /*!< Read Page Scan Type command is supported */
   413 	ESupportedWritePageScanTypeCommand						= 105, /*!< Write Page Scan Type command is supported */
   414 	ESupportedReadAFHChannelAssessmentModeCommand			= 106, /*!< Read AFH Channel Assessment Mode command is supported */
   415 	ESupportedWriteAFHChannelAssessmentModeCommand			= 107, /*!< Write AFH Channel Assessment Mode command is supported */
   416 	ESupportedReadLocalVersionInformationCommand			= 115, /*!< Read Local Version Information command is supported */
   417 	ESupportedReadLocalSupportedFeaturesCommand				= 117, /*!< Read Local Supported Features command is supported */
   418 	ESupportedReadLocalExtendedFeaturesCommand				= 118, /*!< Read Local Extended Features command is supported */
   419 	ESupportedReadBufferSizeCommand							= 119, /*!< Read Buffer Size command is supported */
   420 	ESupportedReadCountryCodeCommand						= 120, /*!< Read Country Code [Deprecated] command is supported */
   421 	ESupportedReadBDADDRCommand								= 121, /*!< Read BD ADDR command is supported */
   422 	ESupportedReadFailedContactCountCommand					= 122, /*!< Read Failed Contact Count command is supported */
   423 	ESupportedResetFailedContactCountCommand				= 123, /*!< Reset Failed Contact Count command is supported */
   424 	ESupportedGetLinkQualityCommand							= 124, /*!< Get Link Quality command is supported */
   425 	ESupportedReadRSSICommand								= 125, /*!< Read RSSI command is supported */
   426 	ESupportedReadAFHChannelMapCommand						= 126, /*!< Read AFH Channel Map command is supported */
   427 	ESupportedReadBDClockCommand							= 127, /*!< Read BD Clock command is supported */
   428 	ESupportedReadLoopbackModeCommand						= 128, /*!< Read Loopback Mode command is supported */
   429 	ESupportedWriteLoopbackModeCommand						= 129, /*!< Write Loopback Mode command is supported */
   430 	ESupportedEnableDeviceUnderTestModeCommand				= 130, /*!< Enable Device Under Test Mode command is supported */
   431 	ESupportedSetupSynchronousConnectionCommand				= 131, /*!< Setup Synchronous Connection command is supported */
   432 	ESupportedAcceptSynchronousConnectionCommand			= 132, /*!< Accept Synchronous Connection command is supported */
   433 	ESupportedRejectSynchronousConnectionCommand			= 133, /*!< Reject Synchronous Connection command is supported */
   434 	ESupportedReadExtendedInquiryResponseCommand			= 136, /*!< Read Extended Inquiry Response command is supported */
   435 	ESupportedWriteExtendedInquiryResponseCommand			= 137, /*!< Write Extended Inquiry Response command is supported */
   436 	ESupportedRefreshEncryptionKeyCommand					= 138, /*!< Refresh Encryption Key command is supported */
   437 	ESupportedSniffSubratingCommand							= 140, /*!< Sniff Subrating command is supported */
   438 	ESupportedReadSimplePairingModeCommand					= 141, /*!< Read Simple Pairing Mode command is supported */
   439 	ESupportedWriteSimplePairingModeCommand					= 142, /*!< Write Simple Pairing Mode command is supported */
   440 	ESupportedReadLocalOOBDataCommand						= 143, /*!< Read Local OOB Data command is supported */
   441 	ESupportedReadInquiryResponseTransmitPowerCommand		= 144, /*!< Read Inquiry Response Transmit Power command is supported */
   442 	ESupportedWriteInquiryTransmitPowerLevelCommand			= 145, /*!< Write Inquiry Transmit Power Level command is supported */
   443 	ESupportedReadDefaultErroneousDataReportingCommand		= 146, /*!< Read Default Erroneous Data Reporting command is supported */
   444 	ESupportedWriteDefaultErroneousDataReportingCommand		= 147, /*!< Write Default Erroneous Data Reporting command is supported */
   445 	ESupportedIOCapabilityRequestReplyCommand				= 151, /*!< IO Capability Request Reply command is supported */
   446 	ESupportedUserConfirmationRequestReplyCommand			= 152, /*!< User Confirmation Request Reply command is supported */
   447 	ESupportedUserConfirmationRequestNegativeReplyCommand	= 153, /*!< User Confirmation Request Negative Reply command is supported */
   448 	ESupportedUserPasskeyRequestReplyCommand				= 154, /*!< User Passkey Request Reply command is supported */
   449 	ESupportedUserPasskeyRequestNegativeReplyCommand		= 155, /*!< User Passkey Request Negative Reply command is supported */
   450 	ESupportedRemoteOOBDataRequestReplyCommand				= 156, /*!< Remote OOB Data Request Reply command is supported */
   451 	ESupportedWriteSimplePairingDebugModeCommand			= 157, /*!< Write Simple Pairing Debug Mode command is supported */
   452 	ESupportedEnhancedFlushCommand							= 158, /*!< Enhanced Flush command is supported */
   453 	ESupportedRemoteOOBDataRequestNegativeReplyCommand		= 159, /*!< Remote OOB Data Request Negative Reply command is supported */
   454 	ESupportedSendKeypressNotificationCommand				= 162, /*!< Send Keypress Notification command is supported */
   455 	ESupportedIOCapabilitiesResponseNegativeReplyCommand	= 163, /*!< IO Capabilities Response Negative Reply command is supported */
   456 	};
   457 
   458 /**
   459 @publishedAll
   460 @released
   461 
   462 Bluetooth SIG specified values indicating whether a device
   463 is physically able to support a baseband (or link manager protocol) feature
   464 */
   465 enum TBTSupportedFeatures
   466 	{
   467 	ESupportedThreeSlotPackets				= 1<<0,  /*!< Three slot packets are supported */
   468 	ESupportedFiveSlotPackets				= 1<<1,  /*!< Five slot packets are supported */
   469 	ESupportedEncryption					= 1<<2,  /*!< Encryption is supported */
   470 	ESupportedSlotOffset					= 1<<3,  /*!< Slot offset is supported */
   471 	ESupportedTimingAccuracy				= 1<<4,  /*!< Timing accuracy is supported */
   472 	ESupportedSwitch						= 1<<5,  /*!< Role switch is supported */
   473 	ESupportedHoldMode						= 1<<6,  /*!< Hold mode is supported */
   474 	ESupportedSniffMode						= 1<<7,  /*!< Sniff mode is supported */
   475 	ESupportedParkMode						= 1<<8,  /*!< Park mode is supported */
   476 	ESupportedRSSI							= 1<<9,  /*!< Receive signal strength indication is supported */
   477 	ESupportedChannelQualityDrivenDataRate	= 1<<10, /*!< Channel quality driven data rate is supported */
   478 	ESupportedSCOLink						= 1<<11, /*!< SCO links are supported */
   479 	ESupportedHV2Packets					= 1<<12, /*!< HV2 packets are supported */
   480 	ESupportedHV3Packets					= 1<<13, /*!< HV3 packets are supported */
   481 	ESupportedu_lawLog						= 1<<14, /*!< SCO u-law encoding is supported */
   482 	ESupportedA_lawLog						= 1<<15, /*!< SCO A-law encoding is supported */
   483 	ESupportedCVSD							= 1<<16, /*!< SCO Continuously variable slope delta modulation is supported */
   484 	ESupportedPagingScheme					= 1<<17, /*!< Paging scheme is supported */
   485 	ESupportedPowerControl					= 1<<18, /*!< Power control is supported */
   486 	ESupportedTransparentSCOData			= 1<<19, /*!< Transparent SCO data is supported */
   487 	ESupportedFlowControlLagBit0			= 1<<20, /*!< Flow control lag bit 0 is supported */
   488 	ESupportedFlowControlLagBit1			= 1<<21, /*!< Flow control lag bit 1 is supported */
   489 	ESupportedFlowControlLagBit2			= 1<<22, /*!< Flow control lag bit 2 is supported */
   490 	};
   491 
   492 /**
   493 @publishedAll
   494 @released
   495 
   496 Bitmask values for notifying/requesting notification of the state of a physical link.
   497 
   498 These values have a two fold purpose:
   499 1) They can be used along with TBTPhysicalLinkStateNotifierCombinations to specify
   500 a set of baseband change events for which notification is desired.
   501 2) They can be used to notify the state of a physical link or a subset of that state.
   502 For example if only mode change events are being monitored, then at each mode change event
   503 only the bit reperesenting the new mode will be returned, however if the whole link state
   504 is required, then a combination of bit values indicating that state will be returned.
   505 
   506 THESE BIT VALUES MUST ONLY BE USED WHEN REQUESTING NOTIFICATION, OR WHEN PARSING THE
   507 RESULTS OF A NOTIFICATION. All other baseband state activities should use one of the 
   508 appropriate Bluetooth SIG specified enums
   509 @see TBTBasebandRole
   510 @see TBTLinkMode
   511 @see TBTLinkModeCombinations
   512 @see TBTPacketType
   513 @see TBTPacketTypeCombinations
   514 */
   515 enum TBTPhysicalLinkStateNotifier
   516 	{
   517 	ENotifyMaster					= 0x00000001, /*!< Master */
   518 	ENotifySlave					= 0x00000002, /*!< Slave */
   519 
   520 	ENotifyActiveMode				= 0x00000004, /*!< Active mode */
   521 	ENotifySniffMode				= 0x00000008, /*!< Sniff mode */
   522 	ENotifyParkMode					= 0x00000010, /*!< Park mode */
   523 	ENotifyHoldMode					= 0x00000020, /*!< Hold mode */
   524 
   525 	ENotifyMaxSlots1				= 0x00000040, /*!< Max slots 1 */
   526 	ENotifyMaxSlots3				= 0x00000080, /*!< Max slots 3 */
   527 	ENotifyMaxSlots5				= 0x00000100, /*!< Max slots 5 */
   528 
   529 	ENotifyPacketsDM1				= 0x00000200, /*!< Packets DM1 */
   530 	ENotifyPacketsDH1				= 0x00000400, /*!< Packets DH1 */
   531 	ENotifyPacketsDM3				= 0x00000800, /*!< Packets DM3 */
   532 	ENotifyPacketsDH3				= 0x00001000, /*!< Packets DH3 */
   533 	ENotifyPacketsDM5				= 0x00002000, /*!< Packets DM5 */
   534 	ENotifyPacketsDH5				= 0x00004000, /*!< Packets DH5 */
   535 
   536 	ENotifyPacketsHV1				= 0x00008000, /*!< HV1 */
   537 	ENotifyPacketsHV2				= 0x00010000, /*!< HV2 */
   538 	ENotifyPacketsHV3				= 0x00020000, /*!< HV3 */
   539 
   540 	ENotifyAuthenticationComplete	= 0x00040000, /*!< Authentication Complete */
   541 	ENotifyEncryptionChangeOn		= 0x00080000, /*!< Encryption Change On */
   542 	ENotifyEncryptionChangeOff		= 0x00100000, /*!< Encryption Change Off */
   543 
   544 	ENotifyPhysicalLinkUp			= 0x00200000, /*!< Physical Link Up */
   545 	ENotifyPhysicalLinkDown			= 0x00400000, /*!< Physical Link Down */
   546 	ENotifyPhysicalLinkError		= 0x00800000, /*!< Physical Link Error */
   547 
   548 	ENotifySynchronousLinkUp		= 0x01000000, /*!< Synchronous Link Up */
   549 	ENotifySynchronousLinkDown		= 0x02000000, /*!< Synchronous Link Down */
   550 	ENotifySynchronousLinkError		= 0x04000000, /*!< Synchronous Link Error */
   551 
   552 	/**
   553  	@deprecated This has been superseded by ENotifySynchronousLinkUp
   554  	@see ENotifySynchronousLinkUp 
   555  	*/
   556  	ENotifySCOLinkUp				= ENotifySynchronousLinkUp,
   557  	/**
   558  	@deprecated This has been superseded by ENotifySynchronousLinkDown
   559  	@see ENotifySynchronousLinkDown 
   560  	*/
   561  	ENotifySCOLinkDown				= ENotifySynchronousLinkDown, 
   562  	/**
   563  	@deprecated This has been superseded by ENotifySynchronousLinkError
   564  	@see ENotifySynchronousLinkError 
   565  	*/
   566  	ENotifySCOLinkError				= ENotifySynchronousLinkError 
   567 
   568 	};
   569 
   570 /**
   571 @publishedAll
   572 @released
   573 
   574 Bitmask values to help request notification of the state of a physical link.
   575 @see TBTPhysicalLinkStateNotifier
   576 */
   577 enum TBTPhysicalLinkStateNotifierCombinations
   578 	{
   579 	ENotifyAnyRole					= ENotifyMaster | ENotifySlave,
   580 	ENotifyAnyLowPowerMode			= ENotifySniffMode | ENotifyParkMode | ENotifyHoldMode,
   581 	ENotifyAnyPowerMode				= ENotifyActiveMode | ENotifyAnyLowPowerMode,
   582 	ENotifyAnyMaxSlots				= ENotifyMaxSlots1 | ENotifyMaxSlots3 | ENotifyMaxSlots5,
   583 	ENotifyAnyACLPacketType			= ENotifyPacketsDM1 | ENotifyPacketsDH1 | ENotifyPacketsDM3 | EPacketsDH3 | EPacketsDM5 | EPacketsDH5,
   584 	ENotifyAnySCOPacketType			= ENotifyPacketsHV1 | ENotifyPacketsHV2 | ENotifyPacketsHV3,
   585 	ENotifyAnyPacketType			= ENotifyAnyACLPacketType | ENotifyAnySCOPacketType,
   586 	ENotifyAnyPhysicalLinkState		= 0xffffffff,
   587 	};
   588 
   589 /**
   590 @publishedAll
   591 @released
   592 
   593 The maximum length of an SDP UUID.
   594 */
   595 static const TInt KSdpUUIDMaxLength			= 16;
   596 
   597 /**
   598 @publishedAll
   599 @released
   600 
   601 The size of a bluetooth device address in bytes.
   602 */
   603 const TInt KBTDevAddrSize=0x06;
   604 
   605 /**
   606 @publishedAll
   607 @released
   608 
   609 The size of a bluetooth device address in bytes.
   610 */
   611 const TInt KBTMaxDevAddrSize = KBTDevAddrSize;
   612 
   613 /**
   614 @publishedAll
   615 @released
   616 
   617 48-bit bluetooth device address.
   618 Each bluetooth device has a unique address built into the hardware, which
   619 is represented by this class. Used for identifying remote addresses.
   620 The interface operates in a big-endian manner -- e.g. addr[0] refers
   621 to the most significant byte of the address. This is the same ordering
   622 as the addresses would naturally be written down on paper.
   623 **/
   624 NONSHARABLE_CLASS(TBTDevAddr)
   625     {
   626 public:
   627     IMPORT_C TBTDevAddr();
   628     IMPORT_C TBTDevAddr(const TInt64 &aInt);
   629     IMPORT_C TBTDevAddr(const TDesC8 &aDes);
   630     IMPORT_C TBool operator==(const TBTDevAddr& aAddr) const;
   631     IMPORT_C TBool operator!=(const TBTDevAddr& aAddr) const;
   632 	IMPORT_C const TUint8 &operator[](TInt aIndex) const;
   633 	IMPORT_C TUint8 &operator[](TInt aIndex);
   634 	IMPORT_C void Reset();
   635 	IMPORT_C TPtr8 Des();
   636 	IMPORT_C const TPtrC8 Des() const;
   637 	IMPORT_C TInt SetReadable(const TDesC& aSource);
   638 	IMPORT_C void GetReadable(TDes& aDest) const;
   639 	IMPORT_C void GetReadable(TDes& aDest, const TDesC& aPrepend, const TDesC& aByteSeperator, const TDesC& aAppend) const;
   640     IMPORT_C TBool operator<=(const TBTDevAddr& aAddr) const;
   641 private:
   642 	TFixedArray<TUint8, KBTDevAddrSize> iAddr;
   643 
   644 	// This data padding has been added to help prevent future binary compatibility breaks	
   645 	// iPadding hasn't been zero'd because it is currently not used
   646 	TUint16     iPadding; 			
   647     };
   648 
   649 /**
   650 @publishedAll
   651 @released
   652 
   653 A Bluetooth Universally Unique Identifier.
   654 
   655 This is a 128-bit quantity that can be created without a central registry 
   656 while still being globally unique.
   657 UUIDs are always held in full 128 bit format, however they can be set from 
   658 BT SIG short form (16 or 32 bit) addresses, and returned as down to their 
   659 shortest form using ShortestForm().
   660 **/
   661 NONSHARABLE_CLASS(TUUID)
   662 	{
   663 public:
   664 	IMPORT_C TUUID();
   665 	IMPORT_C TUUID(TUint32 aLong);
   666 	IMPORT_C TUUID(TUint32 aHH, TUint32 aHL, TUint32 aLH, TUint32 aLL);
   667 	IMPORT_C TUUID(const TUid& aUid);
   668 	IMPORT_C void SetL(const TDesC8& aDes);
   669 	IMPORT_C const TPtrC8 LongForm() const;
   670 	IMPORT_C const TPtrC8 ShortestForm() const;
   671 	IMPORT_C const TPtrC8 Des() const;
   672 	/**
   673 	@deprecated
   674 	Use SpecifiedLengthL(TInt aLength) instead
   675 	*/
   676 	IMPORT_C const TPtrC8 FixedLengthL(TInt aLength) const;
   677 	IMPORT_C TInt MinimumSize() const;
   678     IMPORT_C TBool operator==(const TUUID& aUUID) const;
   679     IMPORT_C TBool operator!=(const TUUID& aUUID) const;
   680 	IMPORT_C const TUint8 &operator[](TInt aIndex) const;
   681 	IMPORT_C TUint8 &operator[](TInt aIndex);
   682 	IMPORT_C const TPtrC8 SpecifiedLengthL(TInt aLength) const;
   683 	IMPORT_C void SetFromLittleEndianL(const TDesC8& aDes);
   684 private:
   685 	TFixedArray<TUint8, KSdpUUIDMaxLength> iUUID;	
   686 
   687 	// This data padding has been added to help prevent future binary compatibility breaks	
   688 	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
   689 	TUint32		iPadding1;
   690 	TUint32		iPadding2;
   691 	};
   692 
   693 
   694 /**
   695 @publishedAll
   696 @released
   697 
   698 A UUID container class
   699 */
   700 NONSHARABLE_CLASS(RUUIDContainer)
   701 	{
   702 public:
   703 	IMPORT_C void Close();
   704 	IMPORT_C void Reset();
   705 	IMPORT_C TInt Count() const;
   706 	IMPORT_C TUUID& operator[](TInt aIndex);
   707 	IMPORT_C const TUUID& operator[](TInt aIndex) const;
   708 	IMPORT_C const TUUID& At(TInt aIndex) const;
   709 	IMPORT_C TBool IsPresent(const TUUID& aUuid) const;
   710 	IMPORT_C TInt Add(const TUUID& aUuid);
   711 
   712 private:
   713 	RArray<TUUID> iUUIDs;
   714 	
   715 	// This data padding has been added to help prevent future binary compatibility breaks
   716 	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
   717 	TUint32		iPadding1;
   718 	TUint32		iPadding2;
   719 	};
   720 
   721 
   722 /**
   723 @publishedAll
   724 @released
   725 
   726 An EIR UUID container class. Contains UUIDs and indications of data completeness
   727 */
   728 NONSHARABLE_CLASS(RExtendedInquiryResponseUUIDContainer)
   729 	{
   730 public:
   731 	enum TUUIDType
   732 		{
   733 		EUUID16  = 0x1,
   734 		EUUID32  = 0x2,
   735 		EUUID128 = 0x4,
   736 		};
   737 	
   738 public:
   739 	IMPORT_C void Close();
   740 	IMPORT_C RUUIDContainer& UUIDs();
   741 	IMPORT_C void SetCompleteness(TUUIDType aType, TBool aIsComplete);
   742 	IMPORT_C TBool GetCompleteness(TUUIDType aType) const;
   743 
   744 private:
   745 	RUUIDContainer iUUIDs;
   746 	TInt iCompleteness;
   747 	
   748 	// This data padding has been added to help prevent future binary compatibility breaks
   749 	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
   750 	TUint32     iPadding1;
   751 	TUint32     iPadding2;
   752 	};
   753 
   754 /**
   755 @publishedAll
   756 @released
   757 
   758 The size of a link key, in bytes.
   759 */
   760 const TUint8 KHCILinkKeySize=16;
   761 
   762 /**
   763 @publishedAll
   764 @released
   765 
   766 The size of a pin code, in bytes.
   767 */
   768 const TUint8 KHCIPINCodeSize=16;
   769 
   770 /**
   771 @publishedAll
   772 @released
   773 
   774 Link key structure.
   775 */
   776 NONSHARABLE_CLASS(TLinkKeyV10)
   777     {
   778 public:
   779     TUint8 iLinkKey[KHCILinkKeySize]; /*!< The link key */
   780     };
   781 
   782 /**
   783 @publishedAll
   784 @released
   785 
   786 Typedef'ed TPckgBuf of the class TLinkKeyV10.
   787 */
   788 typedef TPckgBuf<TLinkKeyV10> TBTLinkKey;
   789 
   790 /**
   791 The type of a link key with a remote device
   792 @publishedAll
   793 @released
   794 */
   795 enum TBTLinkKeyType
   796 	{
   797 	ELinkKeyCombination,					/*!< this key has been generated with pairing with pre-v2.1 Bluetooth devices. */
   798 	ELinkKeyUnauthenticatedUpgradable,		/*!< this key hasn't yet been tried with MITM protection */
   799 	ELinkKeyUnauthenticatedNonUpgradable,	/*!< this key tried MITM protection; remote device incapable */
   800 	ELinkKeyAuthenticated,					/*!< this key authenticated with MITM protection */
   801 	ELinkKeyDebug							/*!< this key has been generated when in simple pairing debug mode */
   802 	};
   803 
   804 /**
   805 @publishedAll
   806 @released
   807 
   808 Bluetooth PIN Code structure.
   809 */
   810 NONSHARABLE_CLASS(TPINCodeV10)
   811     {
   812 public:
   813 	IMPORT_C TBool operator==(const TPINCodeV10& aTPINCodeV10) const;
   814 	
   815 public:
   816     TUint8 iLength; /*!< The length of the pin key */
   817     TUint8 iPIN[KHCIPINCodeSize]; /*!< The pin code */
   818     };
   819 
   820 /**
   821 @publishedAll
   822 @released
   823 
   824 Typedef'ed TPckgBuf of the class TPINCodeV10.
   825 */
   826 typedef TPckgBuf<TPINCodeV10> TBTPinCode;
   827 
   828 /**
   829 The size of a simple pairing hash in bytes.
   830 @publishedPartner
   831 @released
   832 */
   833 const TInt KBluetoothSimplePairingHashSize = 16;
   834 /**
   835 A representation of the simple pairing hash.
   836 @publishedPartner
   837 @released
   838 */
   839 typedef TBuf8<KBluetoothSimplePairingHashSize> TBluetoothSimplePairingHash;
   840 
   841 /**
   842 The size of a simple pairing hash in randomizer.
   843 @publishedPartner
   844 @released
   845 */
   846 const TInt KBluetoothSimplePairingRandomizerSize = 16;
   847 /**
   848 A representation of the simple pairing randomizer.
   849 @publishedPartner
   850 @released
   851 */
   852 typedef TBuf8<KBluetoothSimplePairingRandomizerSize> TBluetoothSimplePairingRandomizer;
   853 
   854 /**
   855 Extended Inquiry Response Class
   856 This class takes a reference from inquiry result, which could hold both local name and Extended Inquiry Response. 
   857 It provides API to parse and return the local name and data for any Extended Inquiry Response tag.
   858 To get Device Name, Manufacturer Specific Data or Flags, firstly getting length of the data, 
   859 and then allocating a suitable buffer, which is where the data will be placed. 
   860 */
   861 NONSHARABLE_CLASS(TBluetoothNameRecordWrapper)
   862 {
   863 public:
   864 	IMPORT_C explicit TBluetoothNameRecordWrapper(const TNameRecord& aNameRecord);
   865 	IMPORT_C TInt GetDeviceName(TDes16& aName, TBool& aIsComplete) const;
   866 	IMPORT_C TInt GetServiceClassUuids(RExtendedInquiryResponseUUIDContainer& aEIRContainer) const;
   867 	IMPORT_C TInt GetVendorSpecificData(TDes8& aDes) const;
   868 	IMPORT_C TInt GetTxPowerLevel(TInt8& aTxPowerLevel) const;
   869 	IMPORT_C TInt GetFlags(TDes8& aDes) const;
   870 	IMPORT_C TInt GetDeviceNameLength() const;
   871 	IMPORT_C TInt GetVendorSpecificDataLength() const;
   872 	IMPORT_C TInt GetFlagsLength() const;
   873 
   874 private:
   875 	TInt AddUuids16(RExtendedInquiryResponseUUIDContainer& aEIRContainer, TPtrC8& aUuids) const;
   876 	TInt AddUuids128(RExtendedInquiryResponseUUIDContainer& aEIRContainer, TPtrC8& aUuids) const;
   877 private:
   878 	TExtendedInquiryResponseDataCodec iEirCodec;
   879 	
   880 	// This data padding has been added to help prevent future binary compatibility breaks	
   881 	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
   882 	TUint32		iPadding1;
   883 	TUint32		iPadding2;
   884 };
   885 
   886 /**
   887 @publishedAll
   888 @released
   889 
   890 Contains information resulting from a baseband notification.
   891 */
   892 NONSHARABLE_CLASS(TBTBasebandEventNotification)
   893 	{
   894 public:
   895 	/** 
   896 	Constructor.
   897 	@param aEventType The type of event.
   898 	@param aErrorCode The error code.
   899 	*/
   900 	TBTBasebandEventNotification(TUint32 aEventType, TInt aErrorCode = KErrNone) : iEventType(aEventType), iErrorCode(aErrorCode) {};
   901 
   902 	/**
   903 	Default constructor.
   904 	*/
   905 	TBTBasebandEventNotification() : iEventType(0), iErrorCode(KErrNone) {};
   906 
   907 	/**
   908 	Copy constructor.
   909 	@param aEvent The event to copy.
   910 	*/
   911 	TBTBasebandEventNotification(const TBTBasebandEventNotification& aEvent) : iEventType(aEvent.iEventType), iErrorCode(aEvent.iErrorCode) {};
   912 
   913 	/**
   914 	The event type.
   915 	@return The event type.
   916 	*/
   917 	TUint32 EventType() const	{ return iEventType; };
   918 
   919 	/**
   920 	The Bluetooth SIG error code associated with the event.
   921 	@return The SIG error code.
   922 	*/
   923 	TInt ErrorCode() const		{ return iErrorCode; };
   924 
   925 	/**
   926 	The Symbian HCI error code associated with the event.
   927 	@return The Symbian error code.
   928 	*/
   929 	IMPORT_C TInt SymbianErrorCode() const;
   930 
   931 	/**
   932 	Set the event type.
   933 	@param aEventType The event type.
   934 	*/
   935 	void SetEventType(TUint32 aEventType)	{ iEventType = aEventType; };
   936 
   937 	/**
   938 	Set the error code.
   939 	@param aErrorCode The Bluetooth SIG error code.
   940 	*/
   941 	void SetErrorCode(TInt aErrorCode)		{ iErrorCode = aErrorCode; };
   942 
   943 private:
   944 	TUint32 iEventType;
   945 	TInt iErrorCode;
   946 	};
   947 
   948 /**
   949 @publishedAll
   950 @released
   951 
   952 Typedef'ed pckgbuf of the class TBTBasebandEventNotification.
   953 */
   954 typedef TPckgBuf<TBTBasebandEventNotification> TBTBasebandEvent;
   955 
   956 /**
   957 @publishedAll
   958 @released
   959 
   960 General Unlimited Inquiry Access Code
   961 */
   962 const TUint KGIAC=0x9e8b33;
   963 
   964 /**
   965 @publishedAll
   966 @released
   967 
   968 Limited Inquiry Access Code
   969 */
   970 const TUint KLIAC=0x9e8b00;
   971 
   972 
   973 /**
   974 @publishedAll
   975 @released
   976 
   977 API class for setting up an L2Cap configuration
   978 
   979 This class may be used to set all or a subset of the following configuration items:
   980 Channel Reliability (and associated timer)
   981 Maximum Transmission Unit
   982 Maximum Receive Unit
   983 Channel Priority
   984 
   985 If a configuration item is to be set, then its 'Set' or 'Setup'
   986 method should be called.
   987 
   988 Once a TL2CapConfig object has been set up it should be sent using
   989 RSocket::SetOption or RSocket::Ioctl (or the CBluetoothSocket) equivalents.
   990 
   991 @see RSocket
   992 @see CBluetoothSocket
   993 */
   994 NONSHARABLE_CLASS(TL2CapConfig)
   995 	{
   996 public:
   997 	/**	
   998 	Priority required for data on L2Cap channel
   999 	*/
  1000 	enum TChannelPriority
  1001 		{
  1002 		EHigh		= 2,
  1003 		EMedium		= 1,
  1004 		ELow		= 0,
  1005 		};
  1006 
  1007 	/**	
  1008 	Reliability of data tranfer required for L2Cap channel
  1009 	*/
  1010 	enum TChannelReliability
  1011 		{
  1012 		EReliableChannel,
  1013 		EUnreliableChannel,
  1014 		};	
  1015 
  1016 	/**	
  1017 	Timer values in milliseconds for reliable and unreliable channels
  1018 	*/
  1019 	enum TL2CapConfigSpecifiedTimers
  1020 		{
  1021 		/**
  1022 		This is a time in milliseconds. However 0xffff has been given a special meaning 
  1023 		in this interface. It means	"Allow up 256 transmissions of a single packet before 
  1024 		giving up and disconnecting the L2Cap channel.". This is the maximum number of
  1025 		transmissions effectively allowed by the spec.
  1026 		*/
  1027 		EDefaultRetransmission = 0xffff,
  1028 		/**
  1029 		Minimum data obsolescence timeout required because data packets 
  1030 		will not ever be sent if we flush them too quickly.
  1031 		Speed of sending data depends on how many channels are open and channel priority.
  1032 		*/
  1033 		EMinDataObsolescenceTimeout = 0x0a,
  1034 		/**
  1035 		This is translated to mean never flush (as per spec).
  1036 		*/
  1037 		EDefaultDataObsolescenceTimeout = 0xffff, 
  1038 		};	
  1039 
  1040 	/**	
  1041 	Used to indicate which config options have been specified by the user
  1042 	*/
  1043 	enum TL2CapConfigSpecifiedMask
  1044 		{
  1045 		ENoConfigElementsSpecified			= 0x0000,
  1046 		EMTUSizeSpecifiedMask				= 0x0001,
  1047 		EMRUSizeSpecifiedMask				= 0x0002,
  1048 		EReliabilitySpecifiedMask			= 0x0004,
  1049 		EPrioritySpecifiedMask				= 0x0008,
  1050 		};
  1051 		
  1052 	IMPORT_C TL2CapConfig();
  1053 
  1054 	IMPORT_C TInt SetMaxTransmitUnitSize(TUint16 aSize = 0xffff);
  1055 	IMPORT_C TUint16 MaxTransmitUnitSize(TBool& aIsSpecified) const;
  1056 	IMPORT_C TInt SetMaxReceiveUnitSize(TUint16 aSize = 0xffff);
  1057 	IMPORT_C TUint16 MaxReceiveUnitSize(TBool& aIsSpecified) const;
  1058 
  1059 	IMPORT_C TInt ConfigureReliableChannel(TUint16 aRetransmissionTimer);
  1060 	IMPORT_C TInt ConfigureUnreliableChannel(TUint16 aObsolescenceTimer);
  1061 	IMPORT_C TChannelReliability ChannelReliability(TBool& aIsSpecified, TUint16& aAssociatedTimer) const;
  1062 	
  1063 	IMPORT_C TInt ConfigureChannelPriority(TChannelPriority aPriority);
  1064 	IMPORT_C TChannelPriority ChannelPriority(TBool& aIsSpecified) const;
  1065 	
  1066 	/**
  1067 	@deprecated
  1068 	Use ConfigureReliableChannel(TUint16 aRetransmissionTimer) instead
  1069 	*/
  1070 	IMPORT_C TInt SetupReliableChannel(TUint16 aRetransmissionTimer = EDefaultRetransmission);
  1071 	/**
  1072 	@deprecated
  1073 	Use ConfigureUnreliableChannel(TUint16 aObsolescenceTimer) instead
  1074 	*/
  1075 	IMPORT_C TInt SetupUnreliableChannel(TUint16 aObsolescenceTimer = EDefaultDataObsolescenceTimeout);
  1076 	/**
  1077 	@deprecated
  1078 	Use ConfigureChannelPriority(TChannelPriority aPriority) instead
  1079 	*/
  1080 	IMPORT_C TInt SetChannelPriority(TChannelPriority aPriority = ELow);
  1081 		
  1082 private:
  1083 	TUint16 iMTUSize;
  1084 	TUint16 iMRUSize;
  1085 	TChannelReliability iChannelReliability;
  1086 	TUint16	iChannelReliabilityTimer;
  1087 	TChannelPriority iChannelPriority;
  1088 	TUint16 iSpecifiedMask;
  1089 
  1090 	// This data padding has been added to help prevent future binary compatibility breaks
  1091 	// Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used	
  1092 	TUint32     iPadding1; 
  1093 	TUint32     iPadding2; 
  1094 	};
  1095 
  1096 /**
  1097 @publishedAll
  1098 @released
  1099 
  1100 Typedef to represent a L2CAP Config object.
  1101 */
  1102 typedef TPckgBuf<TL2CapConfig> TL2CapConfigPkg;
  1103 
  1104 
  1105 enum TEirWrapperPanics
  1106 	{
  1107 	EEirBadUuid16List = 0,
  1108 	EEirBadUuid128List = 1,
  1109 	};
  1110 _LIT(KEirWrapperPanicName, "ExtendedInquiryResponseWrapper");
  1111 
  1112 #endif	//_BTTYPES_H