1.1 --- a/epoc32/include/bttypes.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/bttypes.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,1112 @@
1.4 -bttypes.h
1.5 +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +// BT protocol wide types
1.19 +//
1.20 +//
1.21 +
1.22 +#ifndef _BTTYPES_H
1.23 +#define _BTTYPES_H
1.24 +
1.25 +#include <e32std.h>
1.26 +#include <bluetooth/eirdatacodec.h>
1.27 +
1.28 +/**
1.29 +@publishedAll
1.30 +@released
1.31 +
1.32 +Minimum eSCO connection latency in milliseconds. Attempts to specify less than this will be silently
1.33 +increased to this level.
1.34 +*/
1.35 +static const TInt KMinESCOLatency = 4;
1.36 +
1.37 +/**
1.38 +@publishedAll
1.39 +@released
1.40 +
1.41 +Typedef to represent a HCI connection handle.
1.42 +*/
1.43 +typedef TUint16 THCIConnHandle;
1.44 +
1.45 +/**
1.46 +@publishedAll
1.47 +@released
1.48 +
1.49 +Bluetooth SIG specified values for specification of (piconet) role.
1.50 +*/
1.51 +enum TBTBasebandRole
1.52 + {
1.53 + EMaster = 0x00, /*!< Master role */
1.54 + ESlave = 0x01, /*!< Slave role */
1.55 + ERoleUnknown, /*!< Unknown role */
1.56 + };
1.57 +
1.58 +/**
1.59 +@publishedAll
1.60 +@released
1.61 +
1.62 +Bluetooth SIG specified values for indicating link modes.
1.63 +*/
1.64 +enum TBTLinkMode
1.65 + {
1.66 + EActiveMode = 0x00, /*!< Active mode */
1.67 + EHoldMode = 0x01, /*!< Hold mode */
1.68 + ESniffMode = 0x02, /*!< Sniff mode */
1.69 + EParkMode = 0x04, /*!< Park mode */
1.70 + EScatterMode = 0x08, /*!< Scatter mode */
1.71 + };
1.72 +
1.73 +/**
1.74 +@publishedAll
1.75 +@released
1.76 +
1.77 +Typedef to represent a union of TBTLinkMode values.
1.78 +*/
1.79 +typedef TUint32 TBTLinkModeSet;
1.80 +
1.81 +/**
1.82 +@publishedAll
1.83 +@released
1.84 +
1.85 +Bitmask values to help request combinations of link modes.
1.86 +@see TBTLinkMode
1.87 +*/
1.88 +enum TBTLinkModeCombinations
1.89 + {
1.90 + EAnyLowPowerMode = (EHoldMode | ESniffMode | EParkMode | EScatterMode) /*!< Any low power mode */
1.91 + };
1.92 +
1.93 +/**
1.94 +@publishedAll
1.95 +@released
1.96 +
1.97 +Bluetooth SIG specified values for indicating packet types.
1.98 +
1.99 +DM1, DH1, DM3, DH3, DM5, DH5 are ACL packet types
1.100 +HV1, HV2, HV3 are SCO (synchronous link) packet types
1.101 +*/
1.102 +enum TBTPacketType
1.103 + {
1.104 + EPacketsDM1 = 0x0008, /*!< DM1 ACL packet type */
1.105 + EPacketsDH1 = 0x0010, /*!< DH1 ACL packet type */
1.106 + EPacketsDM3 = 0x0400, /*!< DM3 ACL packet type */
1.107 + EPacketsDH3 = 0x0800, /*!< DH3 ACL packet type */
1.108 + EPacketsDM5 = 0x4000, /*!< DM5 ACL packet type */
1.109 + EPacketsDH5 = 0x8000, /*!< DH5 ACL packet type */
1.110 +
1.111 + EPackets2_DH1 = 0x0002, /*!< 2-DH1 ACL packet type */
1.112 + EPackets3_DH1 = 0x0004, /*!< 3-DH1 ACL packet type */
1.113 + EPackets2_DH3 = 0x0100, /*!< 2-DH3 ACL packet type */
1.114 + EPackets3_DH3 = 0x0200, /*!< 3-DH3 ACL packet type */
1.115 + EPackets2_DH5 = 0x1000, /*!< 2-DH5 ACL packet type */
1.116 + EPackets3_DH5 = 0x2000, /*!< 3-DH5 ACL packet type */
1.117 +
1.118 + EPacketsHV1 = 0x0020, /*!< HV1 SCO packet type */
1.119 + EPacketsHV2 = 0x0040, /*!< HV2 SCO packet type */
1.120 + EPacketsHV3 = 0x0080, /*!< HV3 SCO packet type */
1.121 + };
1.122 +
1.123 +/**
1.124 +@publishedAll
1.125 +@released
1.126 +
1.127 +Typedef to represent a set of SCO packet types.
1.128 +*/
1.129 +typedef TUint16 TBTSCOPackets;
1.130 +
1.131 +/**
1.132 +@publishedAll
1.133 +@released
1.134 +
1.135 +Typedef to represent a set of ACL packet types.
1.136 +*/
1.137 +typedef TUint16 TBTACLPackets;
1.138 +
1.139 +/**
1.140 +@publishedAll
1.141 +@released
1.142 +
1.143 +Bitmask values to help request combinations of packets.
1.144 +@see TBTPacketType
1.145 +*/
1.146 +enum TBTPacketTypeCombinations
1.147 + {
1.148 + EAnyACLPacket = EPacketsDM1 | EPacketsDM3 | EPacketsDM5 | EPacketsDH1 | EPacketsDH3 | EPacketsDH5, /*!< Any ACL packet */
1.149 + EAnyNonEdrACLPacket = EAnyACLPacket | EPackets2_DH1 | EPackets3_DH1 | EPackets2_DH3 | EPackets3_DH3 | EPackets2_DH5 | EPackets3_DH5, /*!< Any Non-EDR ACL packet */
1.150 + EAnySCOPacket = EPacketsHV1 | EPacketsHV2 | EPacketsHV3, /*!< Any SCO packet */
1.151 + EAnyPacket = EAnyACLPacket | EAnySCOPacket /*!< Any packet */
1.152 + };
1.153 +
1.154 +
1.155 +/**
1.156 +@publishedAll
1.157 +@released
1.158 +
1.159 +Typedef to represent a set of synchronous packet types (SCO and eSCO on v1.2).
1.160 +@see TBTSyncPackets::TSyncPackets
1.161 +*/
1.162 +typedef TUint32 TBTSyncPacketTypes;
1.163 +
1.164 +/**
1.165 +@publishedAll
1.166 +@deprecated
1.167 +
1.168 +This constant is no longer needed to translate the SCO mapping of HV packet types to Synchronous
1.169 +because CBluetoothSynchronousLink::SetupConnection(const TBTDevAddr& aBDAddr, const TUint16 aPacketTypes)
1.170 +adjusts aPacketTypes internally on behalf of clients.
1.171 +*/
1.172 +static const TInt KSCOvsSyncHVOffset = 5;
1.173 +
1.174 +/**
1.175 +@publishedAll
1.176 +@released
1.177 +
1.178 +Class to represent a set of synchronous packet types (SCO and eSCO on v1.2).
1.179 +This differs from TBTSyncPacketTypes as it is the interface used by CBluetoothSynchronousLink
1.180 +in order to detect the difference between a pre and post eSCO caller. This is necessary
1.181 +as HV1 packets in the SCO numbering clash with EV5 packets in the sync numbering.
1.182 +*/
1.183 +NONSHARABLE_CLASS(TBTSyncPackets)
1.184 + {
1.185 + public:
1.186 + /**
1.187 + @publishedAll
1.188 + @released
1.189 +
1.190 + Individual synchronous packet types.
1.191 + @see TBTSyncPacketTypes
1.192 + */
1.193 + enum TSyncPackets
1.194 + {
1.195 + ESyncPacketsHV1 = 0x10001,
1.196 + ESyncPacketsHV2 = 0x10002,
1.197 + ESyncPacketsHV3 = 0x10004,
1.198 +
1.199 + ESyncPacketsEV3 = 0x20008,
1.200 + ESyncPacketsEV4 = 0x20010,
1.201 + ESyncPacketsEV5 = 0x20020,
1.202 +
1.203 + ESyncAnySCOPacket = ESyncPacketsHV1 | ESyncPacketsHV2 | ESyncPacketsHV3,
1.204 + ESyncAnyESCOPacket = ESyncPacketsEV3 | ESyncPacketsEV4 | ESyncPacketsEV5
1.205 + };
1.206 +
1.207 + public:
1.208 + IMPORT_C explicit TBTSyncPackets(TBTSyncPacketTypes aPackets);
1.209 + IMPORT_C TBTSyncPacketTypes operator()() const;
1.210 +
1.211 + private:
1.212 + TUint32 iPacketTypes;
1.213 +
1.214 + // This data padding has been added to help prevent future binary compatibility breaks
1.215 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.216 + TUint32 iPadding1;
1.217 + TUint32 iPadding2;
1.218 + };
1.219 +
1.220 +
1.221 +/**
1.222 +@publishedAll
1.223 +@released
1.224 +
1.225 +eSCO links can have different retransmission options, optimised for link usage,
1.226 +power or reliability.
1.227 +
1.228 +@see CBluetoothSynchronousLink::SetRetransmissionEffort
1.229 +*/
1.230 +enum TBTeSCORetransmissionTypes
1.231 + {
1.232 + EeSCORetransmitNone = 0,
1.233 + EeSCORetransmitPower = 1,
1.234 + EeSCORetransmitReliability = 2,
1.235 + EeSCORetransmitDontCare = 0xff
1.236 + };
1.237 +
1.238 +/**
1.239 +@publishedAll
1.240 +@released
1.241 +
1.242 +eSCO unspecified bandwidth. This value can only be used by the accepting side
1.243 +of an eSCO link, to allow any bandwidth to be specified by the initiator.
1.244 +Otherwise both sides of the link must agree on the same bandwidth.
1.245 +
1.246 +@see CBluetoothSynchronousLink::SetBandwidth
1.247 +@see CBluetoothSynchronousLink::AcceptConnection
1.248 +*/
1.249 +static const TUint32 KESCOBandwidthDontCare = KMaxTUint32;
1.250 +
1.251 +/**
1.252 +@internalTechnology
1.253 +
1.254 +Bit positions of the individual local and remote features.
1.255 +@see TBTFeatures
1.256 +*/
1.257 +enum TBTSupportedFeaturesBits
1.258 + {
1.259 + ESupportedThreeSlotPacketsBit = 0, /*!< Three slot packets are supported */
1.260 + ESupportedFiveSlotPacketsBit = 1, /*!< Five slot packets are supported */
1.261 + ESupportedEncryptionBit = 2, /*!< Encryption is supported */
1.262 + ESupportedSlotOffsetBit = 3, /*!< Slot offset is supported */
1.263 + ESupportedTimingAccuracyBit = 4, /*!< Timing accuracy is supported */
1.264 + ESupportedSwitchBit = 5, /*!< Role switch is supported */
1.265 + ESupportedHoldModeBit = 6, /*!< Hold mode is supported */
1.266 + ESupportedSniffModeBit = 7, /*!< Sniff mode is supported */
1.267 + ESupportedParkModeBit = 8, /*!< Park mode is supported */
1.268 + ESupportedRSSIBit = 9, /*!< Receive signal strength indication is supported */
1.269 + ESupportedChannelQualityDrivenDataRateBit = 10, /*!< Channel quality driven data rate is supported */
1.270 + ESupportedSCOLinkBit = 11, /*!< SCO links are supported */
1.271 + ESupportedHV2PacketsBit = 12, /*!< HV2 packets are supported */
1.272 + ESupportedHV3PacketsBit = 13, /*!< HV3 packets are supported */
1.273 + ESupportedu_lawLogBit = 14, /*!< SCO u-law encoding is supported */
1.274 + ESupportedA_lawLogBit = 15, /*!< SCO A-law encoding is supported */
1.275 + ESupportedCVSDBit = 16, /*!< SCO Continuously variable slope delta modulation is supported */
1.276 + ESupportedPagingSchemeBit = 17, /*!< Paging scheme is supported */
1.277 + ESupportedPowerControlBit = 18, /*!< Power control is supported */
1.278 + ESupportedTransparentSCODataBit = 19, /*!< Transparent SCO data is supported */
1.279 + ESupportedFlowControlLagBit0Bit = 20, /*!< Flow control lag bit 0 is supported */
1.280 + ESupportedFlowControlLagBit1Bit = 21, /*!< Flow control lag bit 1 is supported */
1.281 + ESupportedFlowControlLagBit2Bit = 22, /*!< Flow control lag bit 2 is supported */
1.282 + ESupportedBroadcastEncryptionBit = 23, /*!< Broadcast encryption is supported */
1.283 +
1.284 + EEDR_ACL_2MbpsModeBit = 25, /*!< 2Mbps EDR ACL supported */
1.285 + EEDR_ACL_3MbpsModeBit = 26, /*!< 3Mbps EDR ACL supported */
1.286 + ESupportedEnhancedEnquiryScanBit = 27, /*!< Enhanced enquiry scan is supported */
1.287 + ESupportedInterlacedEnquiryScanBit = 28, /*!< Interlaced enquiry scan is supported */
1.288 + ESupportedInterlacedPageScanBit = 29, /*!< Interlaced page scan is supported */
1.289 + ESupportedRSSIWithInquiryResultsBit = 30, /*!< Read signal strength indication with inquiry is supported */
1.290 + ESupportedExtendedSCOLinkBit = 31, /*!< Extended SCO links are supported */
1.291 + ESupportedEV4PacketsBit = 32, /*!< EV4 packets are supported */
1.292 + ESupportedEV5PacketsBit = 33, /*!< EV5 packets are supported */
1.293 +
1.294 + ESupportedAFHCapableSlaveBit = 35, /*!< Adaptive frequency hopping in slave role is supported */
1.295 + ESupportedAFHClassificationSlaveBit = 36, /*!< Adaptive frequency hopping classification in slave role is supported */
1.296 +
1.297 + ESupportedEDRThreeSlotPacketsBit = 39, /*!< Three slot EDR packets are supported */
1.298 + ESupportedEDRFiveSlotPacketsBit = 40, /*!< Five slot EDR packets are supported */
1.299 + ESupportedSniffSubratingBit = 41, /*!< Sniff subrating is supported */
1.300 + ESupportedEncryptionPauseResumeBit = 42, /*!< Encryption Pause and Resume is supported */
1.301 + ESupportedAFHCapableMasterBit = 43, /*!< Adaptive frequency hopping in master role is supported */
1.302 + ESupportedAFHClassificationMasterBit = 44, /*!< Adaptive frequency hopping classification in master role is supported */
1.303 + EEDR_eSCO_2MbpsModeBit = 45, /*!< 2Mbps EDR eSCO supported */
1.304 + EEDR_eSCO_3MbpsModeBit = 46, /*!< 3Mbps EDR eSCO supported */
1.305 + ESupportedEDReSCOThreeSlotPacketsBit = 47, /*!< Three slot EDR eSCO packets are supported */
1.306 + ESupportedExtendedInquiryResponseBit = 48, /*!< Extended Inquiry Response */
1.307 +
1.308 + ESupportedSecureSimplePairingBit = 51, /*!< Secure Simple Pairing */
1.309 + ESupportedEncapsulatedPDUBit = 52, /*!< Encapsulated PDU */
1.310 + ESupportedErroneousDataReportingBit = 53, /*!< Erroneous Data Reporting */
1.311 + ESupportedNonflushablePacketBoundaryFlagBit = 54, /*!< Non-flushable Packet Boundary Flag */
1.312 +
1.313 + ESupportedLinkSupervisionTimeoutChangedEventBit = 56, /*!< Link Supervision Timeout Changed Event */
1.314 + ESupportedInquiryResponseTXPowerLevelBit = 57, /*!< Inquiry Response TX Power Level */
1.315 +
1.316 + ESupportedExtendedFeaturesBit = 63, /*!< Additional features are supported */
1.317 + };
1.318 +
1.319 +/**
1.320 +@internalTechnology
1.321 +
1.322 +Bit positions of the individual local supported HCI commands.
1.323 +@see TBluetoothHciCommands
1.324 +*/
1.325 +enum TBluetoothSupportedCommandsBits
1.326 + {
1.327 + ESupportedInquiryCommand = 0, /*!< Inquiry command is supported */
1.328 + ESupportedInquiryCancelCommand = 1, /*!< Inquiry Cancel command is supported */
1.329 + ESupportedPeriodicInquiryModeCommand = 2, /*!< Periodic Inquiry Mode command is supported */
1.330 + ESupportedExitPeriodicInquiryModeCommand = 3, /*!< Exit Periodic Inquiry Mode command is supported */
1.331 + ESupportedCreateConnectionCommand = 4, /*!< Create Connection command is supported */
1.332 + ESupportedDisconnectCommand = 5, /*!< Disconnect command is supported */
1.333 + ESupportedAddSCOConnectionCommand = 6, /*!< Add SCO Connection command is supported */
1.334 + ESupportedCancelCreateConnectionCommand = 7, /*!< Cancel Create Connection command is supported */
1.335 + ESupportedAcceptConnectionRequestCommand = 8, /*!< Accept Connection Request command is supported */
1.336 + ESupportedRejectConnectionRequestCommand = 9, /*!< Reject Connection Request command is supported */
1.337 + ESupportedLinkKeyRequestReplyCommand = 10, /*!< Link Key Request Reply command is supported */
1.338 + ESupportedLinkKeyRequestNegativeReplyCommand = 11, /*!< Link Key Request Negative Reply command is supported */
1.339 + ESupportedPINCodeRequestReplyCommand = 12, /*!< PIN Code Request Reply command is supported */
1.340 + ESupportedPINCodeRequestNegativeReplyCommand = 13, /*!< PIN Code Request Negative Reply command is supported */
1.341 + ESupportedChangeConnectionPacketTypeCommand = 14, /*!< Change Connection Packet Type command is supported */
1.342 + ESupportedAuthenticationRequestCommand = 15, /*!< Authentication Request command is supported */
1.343 + ESupportedSetConnectionEncryptionCommand = 16, /*!< Set Connection Encryption command is supported */
1.344 + ESupportedChangeConnectionLinkKeyCommand = 17, /*!< Change Connection Link Key command is supported */
1.345 + ESupportedMasterLinkKeyCommand = 18, /*!< Master Link Key command is supported */
1.346 + ESupportedRemoteNameRequestCommand = 19, /*!< Remote Name Request command is supported */
1.347 + ESupportedCancelRemoteNameRequestCommand = 20, /*!< Cancel Remote Name Request command is supported */
1.348 + ESupportedReadRemoteSupportedFeaturesCommand = 21, /*!< Read Remote Supported Features command is supported */
1.349 + ESupportedReadRemoteExtendedFeaturesCommand = 22, /*!< Read Remote Extended Features command is supported */
1.350 + ESupportedReadRemoteVersionInformationCommand = 23, /*!< Read Remote Version Information command is supported */
1.351 + ESupportedReadClockOffsetCommand = 24, /*!< Read Clock Offset command is supported */
1.352 + ESupportedReadLMPHandleCommand = 25, /*!< Read LMP Handle command is supported */
1.353 + ESupportedHoldModeCommand = 33, /*!< Hold Mode command is supported */
1.354 + ESupportedSniffModeCommand = 34, /*!< Sniff Mode command is supported */
1.355 + ESupportedExitSniffModeCommand = 35, /*!< Exit Sniff Mode command is supported */
1.356 + ESupportedParkStateCommand = 36, /*!< Park State command is supported */
1.357 + ESupportedExitParkStateCommand = 37, /*!< Exit Park State command is supported */
1.358 + ESupportedQoSSetupCommand = 38, /*!< QoS Setup command is supported */
1.359 + ESupportedRoleDiscoveryCommand = 39, /*!< Role Discovery command is supported */
1.360 + ESupportedSwitchRoleCommand = 40, /*!< Switch Role command is supported */
1.361 + ESupportedReadLinkPolicySettingsCommand = 41, /*!< Read Link Policy Settings command is supported */
1.362 + ESupportedWriteLinkPolicySettingsCommand = 42, /*!< Write Link Policy Settings command is supported */
1.363 + ESupportedReadDefaultLinkPolicySettingsCommand = 43, /*!< Read Default Link Policy Settings command is supported */
1.364 + ESupportedWriteDefaultLinkPolicySettingsCommand = 44, /*!< Write Default Link Policy Settings command is supported */
1.365 + ESupportedFlowSpecificationCommand = 45, /*!< Flow Specification command is supported */
1.366 + ESupportedSetEventMarkCommand = 46, /*!< Set Event Mark command is supported */
1.367 + ESupportedResetCommand = 47, /*!< Reset command is supported */
1.368 + ESupportedSetEventFilterCommand = 48, /*!< Set Event Filter command is supported */
1.369 + ESupportedFlushCommand = 49, /*!< Flush command is supported */
1.370 + ESupportedReadPINTypeCommand = 50, /*!< Read PIN Type command is supported */
1.371 + ESupportedWritePINTypeCommand = 51, /*!< Write PIN Type command is supported */
1.372 + ESupportedCreateNewUnitKeyCommand = 52, /*!< Create New Unit Key command is supported */
1.373 + ESupportedReadStoredLinkKeyCommand = 53, /*!< Read Stored Link Key command is supported */
1.374 + ESupportedWriteStoredLinkKeyCommand = 54, /*!< Write Stored Link Key command is supported */
1.375 + ESupportedDeleteStoredLinkKeyCommand = 55, /*!< Delete Stored Link Key command is supported */
1.376 + ESupportedWriteLocalNameCommand = 56, /*!< Write Local Name command is supported */
1.377 + ESupportedReadLocalNameCommand = 57, /*!< Read Local Name command is supported */
1.378 + ESupportedReadConnectionAcceptTimeoutCommand = 58, /*!< Read Connection Accept Timeout command is supported */
1.379 + ESupportedWriteConnectionAcceptTimeoutCommand = 59, /*!< Write Connection Accept Timeout command is supported */
1.380 + ESupportedReadPageTimeoutCommand = 60, /*!< Read Page Timeout command is supported */
1.381 + ESupportedWritePageTimeoutCommand = 61, /*!< Write Page Timeout command is supported */
1.382 + ESupportedReadScanEnableCommand = 62, /*!< Read Scan Enable command is supported */
1.383 + ESupportedWriteScanEnableCommand = 63, /*!< Write Scan Enable command is supported */
1.384 + ESupportedReadPageScanActivityCommand = 64, /*!< Read Page Scan Activity command is supported */
1.385 + ESupportedWritePageScanActivityCommand = 65, /*!< Write Page Scan Activity command is supported */
1.386 + ESupportedReadInquiryScanActivityCommand = 66, /*!< Read Inquiry Scan Activity command is supported */
1.387 + ESupportedWriteInquiryScanActivityCommand = 67, /*!< Write Inquiry Scan Activity command is supported */
1.388 + ESupportedReadClassOfDeviceCommand = 72, /*!< Read Class Of Device command is supported */
1.389 + ESupportedWriteClassOfDeviceCommand = 73, /*!< Write Class Of Device command is supported */
1.390 + ESupportedReadVoiceSettingCommand = 74, /*!< Read Voice Setting command is supported */
1.391 + ESupportedWriteVoiceSettingCommand = 75, /*!< Write Voice Setting command is supported */
1.392 + ESupportedReadAutomaticFlushTimeoutCommand = 76, /*!< Read Automatic Flush Timeout command is supported */
1.393 + ESupportedWriteAutomaticFlushTimeoutCommand = 77, /*!< Write Automatic Flush Timeout command is supported */
1.394 + ESupportedReadNumBroadcastRetransmissionsCommand = 78, /*!< Read Num Broadcast Retransmissions command is supported */
1.395 + ESupportedWriteNumBroadcastRetransmissionsCommand = 79, /*!< Write Num Broadcast Retransmissions command is supported */
1.396 + ESupportedReadHoldModeActivityCommand = 80, /*!< Read Hold Mode Activity command is supported */
1.397 + ESupportedWriteHoldModeActivityCommand = 81, /*!< Write Hold Mode Activity command is supported */
1.398 + ESupportedReadTransmitPowerLevelCommand = 82, /*!< Read Transmit Power Level command is supported */
1.399 + ESupportedReadSynchronousFlowControlEnableCommand = 83, /*!< Read Synchronous Flow Control Enable command is supported */
1.400 + ESupportedWriteSynchronousFlowControlEnableCommand = 84, /*!< Write Synchronous Flow Control Enable command is supported */
1.401 + ESupportedSetHostControllerToHostFlowControlCommand = 85, /*!< Set Host Controller To Host Flow Control command is supported */
1.402 + ESupportedHostBufferSizeCommand = 86, /*!< Host Buffer Size command is supported */
1.403 + ESupportedHostNumberOfCompletedPacketsCommand = 87, /*!< Host Number Of Completed Packets command is supported */
1.404 + ESupportedReadLinkSupervisionTimeoutCommand = 88, /*!< Read Link Supervision Timeout command is supported */
1.405 + ESupportedWriteLinkSupervisionTimeoutCommand = 89, /*!< Write Link Supervision Timeout command is supported */
1.406 + ESupportedReadNumberofSupportedIACCommand = 90, /*!< Read Number of Supported IAC command is supported */
1.407 + ESupportedReadCurrentIACLAPCommand = 91, /*!< Read Current IAC LAP command is supported */
1.408 + ESupportedWriteCurrentIACLAPCommand = 92, /*!< Write Current IAC LAP command is supported */
1.409 + ESupportedReadPageScanModeCommand = 95, /*!< Read Page Scan Mode command is supported */
1.410 + ESupportedWritePageScanModeCommand = 96, /*!< Write Page Scan Mode command is supported */
1.411 + ESupportedSetAFHChannelClassificationCommand = 97, /*!< Set AFH Channel Classification command is supported */
1.412 + ESupportedReadInquiryScanTypeCommand = 100, /*!< Read Inquiry Scan Type command is supported */
1.413 + ESupportedWriteInquiryScanTypeCommand = 101, /*!< Write Inquiry Scan Type command is supported */
1.414 + ESupportedReadInquiryModeCommand = 102, /*!< Read Inquiry Mode command is supported */
1.415 + ESupportedWriteInquiryModeCommand = 103, /*!< Write Inquiry Mode command is supported */
1.416 + ESupportedReadPageScanTypeCommand = 104, /*!< Read Page Scan Type command is supported */
1.417 + ESupportedWritePageScanTypeCommand = 105, /*!< Write Page Scan Type command is supported */
1.418 + ESupportedReadAFHChannelAssessmentModeCommand = 106, /*!< Read AFH Channel Assessment Mode command is supported */
1.419 + ESupportedWriteAFHChannelAssessmentModeCommand = 107, /*!< Write AFH Channel Assessment Mode command is supported */
1.420 + ESupportedReadLocalVersionInformationCommand = 115, /*!< Read Local Version Information command is supported */
1.421 + ESupportedReadLocalSupportedFeaturesCommand = 117, /*!< Read Local Supported Features command is supported */
1.422 + ESupportedReadLocalExtendedFeaturesCommand = 118, /*!< Read Local Extended Features command is supported */
1.423 + ESupportedReadBufferSizeCommand = 119, /*!< Read Buffer Size command is supported */
1.424 + ESupportedReadCountryCodeCommand = 120, /*!< Read Country Code [Deprecated] command is supported */
1.425 + ESupportedReadBDADDRCommand = 121, /*!< Read BD ADDR command is supported */
1.426 + ESupportedReadFailedContactCountCommand = 122, /*!< Read Failed Contact Count command is supported */
1.427 + ESupportedResetFailedContactCountCommand = 123, /*!< Reset Failed Contact Count command is supported */
1.428 + ESupportedGetLinkQualityCommand = 124, /*!< Get Link Quality command is supported */
1.429 + ESupportedReadRSSICommand = 125, /*!< Read RSSI command is supported */
1.430 + ESupportedReadAFHChannelMapCommand = 126, /*!< Read AFH Channel Map command is supported */
1.431 + ESupportedReadBDClockCommand = 127, /*!< Read BD Clock command is supported */
1.432 + ESupportedReadLoopbackModeCommand = 128, /*!< Read Loopback Mode command is supported */
1.433 + ESupportedWriteLoopbackModeCommand = 129, /*!< Write Loopback Mode command is supported */
1.434 + ESupportedEnableDeviceUnderTestModeCommand = 130, /*!< Enable Device Under Test Mode command is supported */
1.435 + ESupportedSetupSynchronousConnectionCommand = 131, /*!< Setup Synchronous Connection command is supported */
1.436 + ESupportedAcceptSynchronousConnectionCommand = 132, /*!< Accept Synchronous Connection command is supported */
1.437 + ESupportedRejectSynchronousConnectionCommand = 133, /*!< Reject Synchronous Connection command is supported */
1.438 + ESupportedReadExtendedInquiryResponseCommand = 136, /*!< Read Extended Inquiry Response command is supported */
1.439 + ESupportedWriteExtendedInquiryResponseCommand = 137, /*!< Write Extended Inquiry Response command is supported */
1.440 + ESupportedRefreshEncryptionKeyCommand = 138, /*!< Refresh Encryption Key command is supported */
1.441 + ESupportedSniffSubratingCommand = 140, /*!< Sniff Subrating command is supported */
1.442 + ESupportedReadSimplePairingModeCommand = 141, /*!< Read Simple Pairing Mode command is supported */
1.443 + ESupportedWriteSimplePairingModeCommand = 142, /*!< Write Simple Pairing Mode command is supported */
1.444 + ESupportedReadLocalOOBDataCommand = 143, /*!< Read Local OOB Data command is supported */
1.445 + ESupportedReadInquiryResponseTransmitPowerCommand = 144, /*!< Read Inquiry Response Transmit Power command is supported */
1.446 + ESupportedWriteInquiryTransmitPowerLevelCommand = 145, /*!< Write Inquiry Transmit Power Level command is supported */
1.447 + ESupportedReadDefaultErroneousDataReportingCommand = 146, /*!< Read Default Erroneous Data Reporting command is supported */
1.448 + ESupportedWriteDefaultErroneousDataReportingCommand = 147, /*!< Write Default Erroneous Data Reporting command is supported */
1.449 + ESupportedIOCapabilityRequestReplyCommand = 151, /*!< IO Capability Request Reply command is supported */
1.450 + ESupportedUserConfirmationRequestReplyCommand = 152, /*!< User Confirmation Request Reply command is supported */
1.451 + ESupportedUserConfirmationRequestNegativeReplyCommand = 153, /*!< User Confirmation Request Negative Reply command is supported */
1.452 + ESupportedUserPasskeyRequestReplyCommand = 154, /*!< User Passkey Request Reply command is supported */
1.453 + ESupportedUserPasskeyRequestNegativeReplyCommand = 155, /*!< User Passkey Request Negative Reply command is supported */
1.454 + ESupportedRemoteOOBDataRequestReplyCommand = 156, /*!< Remote OOB Data Request Reply command is supported */
1.455 + ESupportedWriteSimplePairingDebugModeCommand = 157, /*!< Write Simple Pairing Debug Mode command is supported */
1.456 + ESupportedEnhancedFlushCommand = 158, /*!< Enhanced Flush command is supported */
1.457 + ESupportedRemoteOOBDataRequestNegativeReplyCommand = 159, /*!< Remote OOB Data Request Negative Reply command is supported */
1.458 + ESupportedSendKeypressNotificationCommand = 162, /*!< Send Keypress Notification command is supported */
1.459 + ESupportedIOCapabilitiesResponseNegativeReplyCommand = 163, /*!< IO Capabilities Response Negative Reply command is supported */
1.460 + };
1.461 +
1.462 +/**
1.463 +@publishedAll
1.464 +@released
1.465 +
1.466 +Bluetooth SIG specified values indicating whether a device
1.467 +is physically able to support a baseband (or link manager protocol) feature
1.468 +*/
1.469 +enum TBTSupportedFeatures
1.470 + {
1.471 + ESupportedThreeSlotPackets = 1<<0, /*!< Three slot packets are supported */
1.472 + ESupportedFiveSlotPackets = 1<<1, /*!< Five slot packets are supported */
1.473 + ESupportedEncryption = 1<<2, /*!< Encryption is supported */
1.474 + ESupportedSlotOffset = 1<<3, /*!< Slot offset is supported */
1.475 + ESupportedTimingAccuracy = 1<<4, /*!< Timing accuracy is supported */
1.476 + ESupportedSwitch = 1<<5, /*!< Role switch is supported */
1.477 + ESupportedHoldMode = 1<<6, /*!< Hold mode is supported */
1.478 + ESupportedSniffMode = 1<<7, /*!< Sniff mode is supported */
1.479 + ESupportedParkMode = 1<<8, /*!< Park mode is supported */
1.480 + ESupportedRSSI = 1<<9, /*!< Receive signal strength indication is supported */
1.481 + ESupportedChannelQualityDrivenDataRate = 1<<10, /*!< Channel quality driven data rate is supported */
1.482 + ESupportedSCOLink = 1<<11, /*!< SCO links are supported */
1.483 + ESupportedHV2Packets = 1<<12, /*!< HV2 packets are supported */
1.484 + ESupportedHV3Packets = 1<<13, /*!< HV3 packets are supported */
1.485 + ESupportedu_lawLog = 1<<14, /*!< SCO u-law encoding is supported */
1.486 + ESupportedA_lawLog = 1<<15, /*!< SCO A-law encoding is supported */
1.487 + ESupportedCVSD = 1<<16, /*!< SCO Continuously variable slope delta modulation is supported */
1.488 + ESupportedPagingScheme = 1<<17, /*!< Paging scheme is supported */
1.489 + ESupportedPowerControl = 1<<18, /*!< Power control is supported */
1.490 + ESupportedTransparentSCOData = 1<<19, /*!< Transparent SCO data is supported */
1.491 + ESupportedFlowControlLagBit0 = 1<<20, /*!< Flow control lag bit 0 is supported */
1.492 + ESupportedFlowControlLagBit1 = 1<<21, /*!< Flow control lag bit 1 is supported */
1.493 + ESupportedFlowControlLagBit2 = 1<<22, /*!< Flow control lag bit 2 is supported */
1.494 + };
1.495 +
1.496 +/**
1.497 +@publishedAll
1.498 +@released
1.499 +
1.500 +Bitmask values for notifying/requesting notification of the state of a physical link.
1.501 +
1.502 +These values have a two fold purpose:
1.503 +1) They can be used along with TBTPhysicalLinkStateNotifierCombinations to specify
1.504 +a set of baseband change events for which notification is desired.
1.505 +2) They can be used to notify the state of a physical link or a subset of that state.
1.506 +For example if only mode change events are being monitored, then at each mode change event
1.507 +only the bit reperesenting the new mode will be returned, however if the whole link state
1.508 +is required, then a combination of bit values indicating that state will be returned.
1.509 +
1.510 +THESE BIT VALUES MUST ONLY BE USED WHEN REQUESTING NOTIFICATION, OR WHEN PARSING THE
1.511 +RESULTS OF A NOTIFICATION. All other baseband state activities should use one of the
1.512 +appropriate Bluetooth SIG specified enums
1.513 +@see TBTBasebandRole
1.514 +@see TBTLinkMode
1.515 +@see TBTLinkModeCombinations
1.516 +@see TBTPacketType
1.517 +@see TBTPacketTypeCombinations
1.518 +*/
1.519 +enum TBTPhysicalLinkStateNotifier
1.520 + {
1.521 + ENotifyMaster = 0x00000001, /*!< Master */
1.522 + ENotifySlave = 0x00000002, /*!< Slave */
1.523 +
1.524 + ENotifyActiveMode = 0x00000004, /*!< Active mode */
1.525 + ENotifySniffMode = 0x00000008, /*!< Sniff mode */
1.526 + ENotifyParkMode = 0x00000010, /*!< Park mode */
1.527 + ENotifyHoldMode = 0x00000020, /*!< Hold mode */
1.528 +
1.529 + ENotifyMaxSlots1 = 0x00000040, /*!< Max slots 1 */
1.530 + ENotifyMaxSlots3 = 0x00000080, /*!< Max slots 3 */
1.531 + ENotifyMaxSlots5 = 0x00000100, /*!< Max slots 5 */
1.532 +
1.533 + ENotifyPacketsDM1 = 0x00000200, /*!< Packets DM1 */
1.534 + ENotifyPacketsDH1 = 0x00000400, /*!< Packets DH1 */
1.535 + ENotifyPacketsDM3 = 0x00000800, /*!< Packets DM3 */
1.536 + ENotifyPacketsDH3 = 0x00001000, /*!< Packets DH3 */
1.537 + ENotifyPacketsDM5 = 0x00002000, /*!< Packets DM5 */
1.538 + ENotifyPacketsDH5 = 0x00004000, /*!< Packets DH5 */
1.539 +
1.540 + ENotifyPacketsHV1 = 0x00008000, /*!< HV1 */
1.541 + ENotifyPacketsHV2 = 0x00010000, /*!< HV2 */
1.542 + ENotifyPacketsHV3 = 0x00020000, /*!< HV3 */
1.543 +
1.544 + ENotifyAuthenticationComplete = 0x00040000, /*!< Authentication Complete */
1.545 + ENotifyEncryptionChangeOn = 0x00080000, /*!< Encryption Change On */
1.546 + ENotifyEncryptionChangeOff = 0x00100000, /*!< Encryption Change Off */
1.547 +
1.548 + ENotifyPhysicalLinkUp = 0x00200000, /*!< Physical Link Up */
1.549 + ENotifyPhysicalLinkDown = 0x00400000, /*!< Physical Link Down */
1.550 + ENotifyPhysicalLinkError = 0x00800000, /*!< Physical Link Error */
1.551 +
1.552 + ENotifySynchronousLinkUp = 0x01000000, /*!< Synchronous Link Up */
1.553 + ENotifySynchronousLinkDown = 0x02000000, /*!< Synchronous Link Down */
1.554 + ENotifySynchronousLinkError = 0x04000000, /*!< Synchronous Link Error */
1.555 +
1.556 + /**
1.557 + @deprecated This has been superseded by ENotifySynchronousLinkUp
1.558 + @see ENotifySynchronousLinkUp
1.559 + */
1.560 + ENotifySCOLinkUp = ENotifySynchronousLinkUp,
1.561 + /**
1.562 + @deprecated This has been superseded by ENotifySynchronousLinkDown
1.563 + @see ENotifySynchronousLinkDown
1.564 + */
1.565 + ENotifySCOLinkDown = ENotifySynchronousLinkDown,
1.566 + /**
1.567 + @deprecated This has been superseded by ENotifySynchronousLinkError
1.568 + @see ENotifySynchronousLinkError
1.569 + */
1.570 + ENotifySCOLinkError = ENotifySynchronousLinkError
1.571 +
1.572 + };
1.573 +
1.574 +/**
1.575 +@publishedAll
1.576 +@released
1.577 +
1.578 +Bitmask values to help request notification of the state of a physical link.
1.579 +@see TBTPhysicalLinkStateNotifier
1.580 +*/
1.581 +enum TBTPhysicalLinkStateNotifierCombinations
1.582 + {
1.583 + ENotifyAnyRole = ENotifyMaster | ENotifySlave,
1.584 + ENotifyAnyLowPowerMode = ENotifySniffMode | ENotifyParkMode | ENotifyHoldMode,
1.585 + ENotifyAnyPowerMode = ENotifyActiveMode | ENotifyAnyLowPowerMode,
1.586 + ENotifyAnyMaxSlots = ENotifyMaxSlots1 | ENotifyMaxSlots3 | ENotifyMaxSlots5,
1.587 + ENotifyAnyACLPacketType = ENotifyPacketsDM1 | ENotifyPacketsDH1 | ENotifyPacketsDM3 | EPacketsDH3 | EPacketsDM5 | EPacketsDH5,
1.588 + ENotifyAnySCOPacketType = ENotifyPacketsHV1 | ENotifyPacketsHV2 | ENotifyPacketsHV3,
1.589 + ENotifyAnyPacketType = ENotifyAnyACLPacketType | ENotifyAnySCOPacketType,
1.590 + ENotifyAnyPhysicalLinkState = 0xffffffff,
1.591 + };
1.592 +
1.593 +/**
1.594 +@publishedAll
1.595 +@released
1.596 +
1.597 +The maximum length of an SDP UUID.
1.598 +*/
1.599 +static const TInt KSdpUUIDMaxLength = 16;
1.600 +
1.601 +/**
1.602 +@publishedAll
1.603 +@released
1.604 +
1.605 +The size of a bluetooth device address in bytes.
1.606 +*/
1.607 +const TInt KBTDevAddrSize=0x06;
1.608 +
1.609 +/**
1.610 +@publishedAll
1.611 +@released
1.612 +
1.613 +The size of a bluetooth device address in bytes.
1.614 +*/
1.615 +const TInt KBTMaxDevAddrSize = KBTDevAddrSize;
1.616 +
1.617 +/**
1.618 +@publishedAll
1.619 +@released
1.620 +
1.621 +48-bit bluetooth device address.
1.622 +Each bluetooth device has a unique address built into the hardware, which
1.623 +is represented by this class. Used for identifying remote addresses.
1.624 +The interface operates in a big-endian manner -- e.g. addr[0] refers
1.625 +to the most significant byte of the address. This is the same ordering
1.626 +as the addresses would naturally be written down on paper.
1.627 +**/
1.628 +NONSHARABLE_CLASS(TBTDevAddr)
1.629 + {
1.630 +public:
1.631 + IMPORT_C TBTDevAddr();
1.632 + IMPORT_C TBTDevAddr(const TInt64 &aInt);
1.633 + IMPORT_C TBTDevAddr(const TDesC8 &aDes);
1.634 + IMPORT_C TBool operator==(const TBTDevAddr& aAddr) const;
1.635 + IMPORT_C TBool operator!=(const TBTDevAddr& aAddr) const;
1.636 + IMPORT_C const TUint8 &operator[](TInt aIndex) const;
1.637 + IMPORT_C TUint8 &operator[](TInt aIndex);
1.638 + IMPORT_C void Reset();
1.639 + IMPORT_C TPtr8 Des();
1.640 + IMPORT_C const TPtrC8 Des() const;
1.641 + IMPORT_C TInt SetReadable(const TDesC& aSource);
1.642 + IMPORT_C void GetReadable(TDes& aDest) const;
1.643 + IMPORT_C void GetReadable(TDes& aDest, const TDesC& aPrepend, const TDesC& aByteSeperator, const TDesC& aAppend) const;
1.644 + IMPORT_C TBool operator<=(const TBTDevAddr& aAddr) const;
1.645 +private:
1.646 + TFixedArray<TUint8, KBTDevAddrSize> iAddr;
1.647 +
1.648 + // This data padding has been added to help prevent future binary compatibility breaks
1.649 + // iPadding hasn't been zero'd because it is currently not used
1.650 + TUint16 iPadding;
1.651 + };
1.652 +
1.653 +/**
1.654 +@publishedAll
1.655 +@released
1.656 +
1.657 +A Bluetooth Universally Unique Identifier.
1.658 +
1.659 +This is a 128-bit quantity that can be created without a central registry
1.660 +while still being globally unique.
1.661 +UUIDs are always held in full 128 bit format, however they can be set from
1.662 +BT SIG short form (16 or 32 bit) addresses, and returned as down to their
1.663 +shortest form using ShortestForm().
1.664 +**/
1.665 +NONSHARABLE_CLASS(TUUID)
1.666 + {
1.667 +public:
1.668 + IMPORT_C TUUID();
1.669 + IMPORT_C TUUID(TUint32 aLong);
1.670 + IMPORT_C TUUID(TUint32 aHH, TUint32 aHL, TUint32 aLH, TUint32 aLL);
1.671 + IMPORT_C TUUID(const TUid& aUid);
1.672 + IMPORT_C void SetL(const TDesC8& aDes);
1.673 + IMPORT_C const TPtrC8 LongForm() const;
1.674 + IMPORT_C const TPtrC8 ShortestForm() const;
1.675 + IMPORT_C const TPtrC8 Des() const;
1.676 + /**
1.677 + @deprecated
1.678 + Use SpecifiedLengthL(TInt aLength) instead
1.679 + */
1.680 + IMPORT_C const TPtrC8 FixedLengthL(TInt aLength) const;
1.681 + IMPORT_C TInt MinimumSize() const;
1.682 + IMPORT_C TBool operator==(const TUUID& aUUID) const;
1.683 + IMPORT_C TBool operator!=(const TUUID& aUUID) const;
1.684 + IMPORT_C const TUint8 &operator[](TInt aIndex) const;
1.685 + IMPORT_C TUint8 &operator[](TInt aIndex);
1.686 + IMPORT_C const TPtrC8 SpecifiedLengthL(TInt aLength) const;
1.687 + IMPORT_C void SetFromLittleEndianL(const TDesC8& aDes);
1.688 +private:
1.689 + TFixedArray<TUint8, KSdpUUIDMaxLength> iUUID;
1.690 +
1.691 + // This data padding has been added to help prevent future binary compatibility breaks
1.692 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.693 + TUint32 iPadding1;
1.694 + TUint32 iPadding2;
1.695 + };
1.696 +
1.697 +
1.698 +/**
1.699 +@publishedAll
1.700 +@released
1.701 +
1.702 +A UUID container class
1.703 +*/
1.704 +NONSHARABLE_CLASS(RUUIDContainer)
1.705 + {
1.706 +public:
1.707 + IMPORT_C void Close();
1.708 + IMPORT_C void Reset();
1.709 + IMPORT_C TInt Count() const;
1.710 + IMPORT_C TUUID& operator[](TInt aIndex);
1.711 + IMPORT_C const TUUID& operator[](TInt aIndex) const;
1.712 + IMPORT_C const TUUID& At(TInt aIndex) const;
1.713 + IMPORT_C TBool IsPresent(const TUUID& aUuid) const;
1.714 + IMPORT_C TInt Add(const TUUID& aUuid);
1.715 +
1.716 +private:
1.717 + RArray<TUUID> iUUIDs;
1.718 +
1.719 + // This data padding has been added to help prevent future binary compatibility breaks
1.720 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.721 + TUint32 iPadding1;
1.722 + TUint32 iPadding2;
1.723 + };
1.724 +
1.725 +
1.726 +/**
1.727 +@publishedAll
1.728 +@released
1.729 +
1.730 +An EIR UUID container class. Contains UUIDs and indications of data completeness
1.731 +*/
1.732 +NONSHARABLE_CLASS(RExtendedInquiryResponseUUIDContainer)
1.733 + {
1.734 +public:
1.735 + enum TUUIDType
1.736 + {
1.737 + EUUID16 = 0x1,
1.738 + EUUID32 = 0x2,
1.739 + EUUID128 = 0x4,
1.740 + };
1.741 +
1.742 +public:
1.743 + IMPORT_C void Close();
1.744 + IMPORT_C RUUIDContainer& UUIDs();
1.745 + IMPORT_C void SetCompleteness(TUUIDType aType, TBool aIsComplete);
1.746 + IMPORT_C TBool GetCompleteness(TUUIDType aType) const;
1.747 +
1.748 +private:
1.749 + RUUIDContainer iUUIDs;
1.750 + TInt iCompleteness;
1.751 +
1.752 + // This data padding has been added to help prevent future binary compatibility breaks
1.753 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.754 + TUint32 iPadding1;
1.755 + TUint32 iPadding2;
1.756 + };
1.757 +
1.758 +/**
1.759 +@publishedAll
1.760 +@released
1.761 +
1.762 +The size of a link key, in bytes.
1.763 +*/
1.764 +const TUint8 KHCILinkKeySize=16;
1.765 +
1.766 +/**
1.767 +@publishedAll
1.768 +@released
1.769 +
1.770 +The size of a pin code, in bytes.
1.771 +*/
1.772 +const TUint8 KHCIPINCodeSize=16;
1.773 +
1.774 +/**
1.775 +@publishedAll
1.776 +@released
1.777 +
1.778 +Link key structure.
1.779 +*/
1.780 +NONSHARABLE_CLASS(TLinkKeyV10)
1.781 + {
1.782 +public:
1.783 + TUint8 iLinkKey[KHCILinkKeySize]; /*!< The link key */
1.784 + };
1.785 +
1.786 +/**
1.787 +@publishedAll
1.788 +@released
1.789 +
1.790 +Typedef'ed TPckgBuf of the class TLinkKeyV10.
1.791 +*/
1.792 +typedef TPckgBuf<TLinkKeyV10> TBTLinkKey;
1.793 +
1.794 +/**
1.795 +The type of a link key with a remote device
1.796 +@publishedAll
1.797 +@released
1.798 +*/
1.799 +enum TBTLinkKeyType
1.800 + {
1.801 + ELinkKeyCombination, /*!< this key has been generated with pairing with pre-v2.1 Bluetooth devices. */
1.802 + ELinkKeyUnauthenticatedUpgradable, /*!< this key hasn't yet been tried with MITM protection */
1.803 + ELinkKeyUnauthenticatedNonUpgradable, /*!< this key tried MITM protection; remote device incapable */
1.804 + ELinkKeyAuthenticated, /*!< this key authenticated with MITM protection */
1.805 + ELinkKeyDebug /*!< this key has been generated when in simple pairing debug mode */
1.806 + };
1.807 +
1.808 +/**
1.809 +@publishedAll
1.810 +@released
1.811 +
1.812 +Bluetooth PIN Code structure.
1.813 +*/
1.814 +NONSHARABLE_CLASS(TPINCodeV10)
1.815 + {
1.816 +public:
1.817 + IMPORT_C TBool operator==(const TPINCodeV10& aTPINCodeV10) const;
1.818 +
1.819 +public:
1.820 + TUint8 iLength; /*!< The length of the pin key */
1.821 + TUint8 iPIN[KHCIPINCodeSize]; /*!< The pin code */
1.822 + };
1.823 +
1.824 +/**
1.825 +@publishedAll
1.826 +@released
1.827 +
1.828 +Typedef'ed TPckgBuf of the class TPINCodeV10.
1.829 +*/
1.830 +typedef TPckgBuf<TPINCodeV10> TBTPinCode;
1.831 +
1.832 +/**
1.833 +The size of a simple pairing hash in bytes.
1.834 +@publishedPartner
1.835 +@released
1.836 +*/
1.837 +const TInt KBluetoothSimplePairingHashSize = 16;
1.838 +/**
1.839 +A representation of the simple pairing hash.
1.840 +@publishedPartner
1.841 +@released
1.842 +*/
1.843 +typedef TBuf8<KBluetoothSimplePairingHashSize> TBluetoothSimplePairingHash;
1.844 +
1.845 +/**
1.846 +The size of a simple pairing hash in randomizer.
1.847 +@publishedPartner
1.848 +@released
1.849 +*/
1.850 +const TInt KBluetoothSimplePairingRandomizerSize = 16;
1.851 +/**
1.852 +A representation of the simple pairing randomizer.
1.853 +@publishedPartner
1.854 +@released
1.855 +*/
1.856 +typedef TBuf8<KBluetoothSimplePairingRandomizerSize> TBluetoothSimplePairingRandomizer;
1.857 +
1.858 +/**
1.859 +Extended Inquiry Response Class
1.860 +This class takes a reference from inquiry result, which could hold both local name and Extended Inquiry Response.
1.861 +It provides API to parse and return the local name and data for any Extended Inquiry Response tag.
1.862 +To get Device Name, Manufacturer Specific Data or Flags, firstly getting length of the data,
1.863 +and then allocating a suitable buffer, which is where the data will be placed.
1.864 +*/
1.865 +NONSHARABLE_CLASS(TBluetoothNameRecordWrapper)
1.866 +{
1.867 +public:
1.868 + IMPORT_C explicit TBluetoothNameRecordWrapper(const TNameRecord& aNameRecord);
1.869 + IMPORT_C TInt GetDeviceName(TDes16& aName, TBool& aIsComplete) const;
1.870 + IMPORT_C TInt GetServiceClassUuids(RExtendedInquiryResponseUUIDContainer& aEIRContainer) const;
1.871 + IMPORT_C TInt GetVendorSpecificData(TDes8& aDes) const;
1.872 + IMPORT_C TInt GetTxPowerLevel(TInt8& aTxPowerLevel) const;
1.873 + IMPORT_C TInt GetFlags(TDes8& aDes) const;
1.874 + IMPORT_C TInt GetDeviceNameLength() const;
1.875 + IMPORT_C TInt GetVendorSpecificDataLength() const;
1.876 + IMPORT_C TInt GetFlagsLength() const;
1.877 +
1.878 +private:
1.879 + TInt AddUuids16(RExtendedInquiryResponseUUIDContainer& aEIRContainer, TPtrC8& aUuids) const;
1.880 + TInt AddUuids128(RExtendedInquiryResponseUUIDContainer& aEIRContainer, TPtrC8& aUuids) const;
1.881 +private:
1.882 + TExtendedInquiryResponseDataCodec iEirCodec;
1.883 +
1.884 + // This data padding has been added to help prevent future binary compatibility breaks
1.885 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.886 + TUint32 iPadding1;
1.887 + TUint32 iPadding2;
1.888 +};
1.889 +
1.890 +/**
1.891 +@publishedAll
1.892 +@released
1.893 +
1.894 +Contains information resulting from a baseband notification.
1.895 +*/
1.896 +NONSHARABLE_CLASS(TBTBasebandEventNotification)
1.897 + {
1.898 +public:
1.899 + /**
1.900 + Constructor.
1.901 + @param aEventType The type of event.
1.902 + @param aErrorCode The error code.
1.903 + */
1.904 + TBTBasebandEventNotification(TUint32 aEventType, TInt aErrorCode = KErrNone) : iEventType(aEventType), iErrorCode(aErrorCode) {};
1.905 +
1.906 + /**
1.907 + Default constructor.
1.908 + */
1.909 + TBTBasebandEventNotification() : iEventType(0), iErrorCode(KErrNone) {};
1.910 +
1.911 + /**
1.912 + Copy constructor.
1.913 + @param aEvent The event to copy.
1.914 + */
1.915 + TBTBasebandEventNotification(const TBTBasebandEventNotification& aEvent) : iEventType(aEvent.iEventType), iErrorCode(aEvent.iErrorCode) {};
1.916 +
1.917 + /**
1.918 + The event type.
1.919 + @return The event type.
1.920 + */
1.921 + TUint32 EventType() const { return iEventType; };
1.922 +
1.923 + /**
1.924 + The Bluetooth SIG error code associated with the event.
1.925 + @return The SIG error code.
1.926 + */
1.927 + TInt ErrorCode() const { return iErrorCode; };
1.928 +
1.929 + /**
1.930 + The Symbian HCI error code associated with the event.
1.931 + @return The Symbian error code.
1.932 + */
1.933 + IMPORT_C TInt SymbianErrorCode() const;
1.934 +
1.935 + /**
1.936 + Set the event type.
1.937 + @param aEventType The event type.
1.938 + */
1.939 + void SetEventType(TUint32 aEventType) { iEventType = aEventType; };
1.940 +
1.941 + /**
1.942 + Set the error code.
1.943 + @param aErrorCode The Bluetooth SIG error code.
1.944 + */
1.945 + void SetErrorCode(TInt aErrorCode) { iErrorCode = aErrorCode; };
1.946 +
1.947 +private:
1.948 + TUint32 iEventType;
1.949 + TInt iErrorCode;
1.950 + };
1.951 +
1.952 +/**
1.953 +@publishedAll
1.954 +@released
1.955 +
1.956 +Typedef'ed pckgbuf of the class TBTBasebandEventNotification.
1.957 +*/
1.958 +typedef TPckgBuf<TBTBasebandEventNotification> TBTBasebandEvent;
1.959 +
1.960 +/**
1.961 +@publishedAll
1.962 +@released
1.963 +
1.964 +General Unlimited Inquiry Access Code
1.965 +*/
1.966 +const TUint KGIAC=0x9e8b33;
1.967 +
1.968 +/**
1.969 +@publishedAll
1.970 +@released
1.971 +
1.972 +Limited Inquiry Access Code
1.973 +*/
1.974 +const TUint KLIAC=0x9e8b00;
1.975 +
1.976 +
1.977 +/**
1.978 +@publishedAll
1.979 +@released
1.980 +
1.981 +API class for setting up an L2Cap configuration
1.982 +
1.983 +This class may be used to set all or a subset of the following configuration items:
1.984 +Channel Reliability (and associated timer)
1.985 +Maximum Transmission Unit
1.986 +Maximum Receive Unit
1.987 +Channel Priority
1.988 +
1.989 +If a configuration item is to be set, then its 'Set' or 'Setup'
1.990 +method should be called.
1.991 +
1.992 +Once a TL2CapConfig object has been set up it should be sent using
1.993 +RSocket::SetOption or RSocket::Ioctl (or the CBluetoothSocket) equivalents.
1.994 +
1.995 +@see RSocket
1.996 +@see CBluetoothSocket
1.997 +*/
1.998 +NONSHARABLE_CLASS(TL2CapConfig)
1.999 + {
1.1000 +public:
1.1001 + /**
1.1002 + Priority required for data on L2Cap channel
1.1003 + */
1.1004 + enum TChannelPriority
1.1005 + {
1.1006 + EHigh = 2,
1.1007 + EMedium = 1,
1.1008 + ELow = 0,
1.1009 + };
1.1010 +
1.1011 + /**
1.1012 + Reliability of data tranfer required for L2Cap channel
1.1013 + */
1.1014 + enum TChannelReliability
1.1015 + {
1.1016 + EReliableChannel,
1.1017 + EUnreliableChannel,
1.1018 + };
1.1019 +
1.1020 + /**
1.1021 + Timer values in milliseconds for reliable and unreliable channels
1.1022 + */
1.1023 + enum TL2CapConfigSpecifiedTimers
1.1024 + {
1.1025 + /**
1.1026 + This is a time in milliseconds. However 0xffff has been given a special meaning
1.1027 + in this interface. It means "Allow up 256 transmissions of a single packet before
1.1028 + giving up and disconnecting the L2Cap channel.". This is the maximum number of
1.1029 + transmissions effectively allowed by the spec.
1.1030 + */
1.1031 + EDefaultRetransmission = 0xffff,
1.1032 + /**
1.1033 + Minimum data obsolescence timeout required because data packets
1.1034 + will not ever be sent if we flush them too quickly.
1.1035 + Speed of sending data depends on how many channels are open and channel priority.
1.1036 + */
1.1037 + EMinDataObsolescenceTimeout = 0x0a,
1.1038 + /**
1.1039 + This is translated to mean never flush (as per spec).
1.1040 + */
1.1041 + EDefaultDataObsolescenceTimeout = 0xffff,
1.1042 + };
1.1043 +
1.1044 + /**
1.1045 + Used to indicate which config options have been specified by the user
1.1046 + */
1.1047 + enum TL2CapConfigSpecifiedMask
1.1048 + {
1.1049 + ENoConfigElementsSpecified = 0x0000,
1.1050 + EMTUSizeSpecifiedMask = 0x0001,
1.1051 + EMRUSizeSpecifiedMask = 0x0002,
1.1052 + EReliabilitySpecifiedMask = 0x0004,
1.1053 + EPrioritySpecifiedMask = 0x0008,
1.1054 + };
1.1055 +
1.1056 + IMPORT_C TL2CapConfig();
1.1057 +
1.1058 + IMPORT_C TInt SetMaxTransmitUnitSize(TUint16 aSize = 0xffff);
1.1059 + IMPORT_C TUint16 MaxTransmitUnitSize(TBool& aIsSpecified) const;
1.1060 + IMPORT_C TInt SetMaxReceiveUnitSize(TUint16 aSize = 0xffff);
1.1061 + IMPORT_C TUint16 MaxReceiveUnitSize(TBool& aIsSpecified) const;
1.1062 +
1.1063 + IMPORT_C TInt ConfigureReliableChannel(TUint16 aRetransmissionTimer);
1.1064 + IMPORT_C TInt ConfigureUnreliableChannel(TUint16 aObsolescenceTimer);
1.1065 + IMPORT_C TChannelReliability ChannelReliability(TBool& aIsSpecified, TUint16& aAssociatedTimer) const;
1.1066 +
1.1067 + IMPORT_C TInt ConfigureChannelPriority(TChannelPriority aPriority);
1.1068 + IMPORT_C TChannelPriority ChannelPriority(TBool& aIsSpecified) const;
1.1069 +
1.1070 + /**
1.1071 + @deprecated
1.1072 + Use ConfigureReliableChannel(TUint16 aRetransmissionTimer) instead
1.1073 + */
1.1074 + IMPORT_C TInt SetupReliableChannel(TUint16 aRetransmissionTimer = EDefaultRetransmission);
1.1075 + /**
1.1076 + @deprecated
1.1077 + Use ConfigureUnreliableChannel(TUint16 aObsolescenceTimer) instead
1.1078 + */
1.1079 + IMPORT_C TInt SetupUnreliableChannel(TUint16 aObsolescenceTimer = EDefaultDataObsolescenceTimeout);
1.1080 + /**
1.1081 + @deprecated
1.1082 + Use ConfigureChannelPriority(TChannelPriority aPriority) instead
1.1083 + */
1.1084 + IMPORT_C TInt SetChannelPriority(TChannelPriority aPriority = ELow);
1.1085 +
1.1086 +private:
1.1087 + TUint16 iMTUSize;
1.1088 + TUint16 iMRUSize;
1.1089 + TChannelReliability iChannelReliability;
1.1090 + TUint16 iChannelReliabilityTimer;
1.1091 + TChannelPriority iChannelPriority;
1.1092 + TUint16 iSpecifiedMask;
1.1093 +
1.1094 + // This data padding has been added to help prevent future binary compatibility breaks
1.1095 + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.1096 + TUint32 iPadding1;
1.1097 + TUint32 iPadding2;
1.1098 + };
1.1099 +
1.1100 +/**
1.1101 +@publishedAll
1.1102 +@released
1.1103 +
1.1104 +Typedef to represent a L2CAP Config object.
1.1105 +*/
1.1106 +typedef TPckgBuf<TL2CapConfig> TL2CapConfigPkg;
1.1107 +
1.1108 +
1.1109 +enum TEirWrapperPanics
1.1110 + {
1.1111 + EEirBadUuid16List = 0,
1.1112 + EEirBadUuid128List = 1,
1.1113 + };
1.1114 +_LIT(KEirWrapperPanicName, "ExtendedInquiryResponseWrapper");
1.1115 +
1.1116 +#endif //_BTTYPES_H