1.1 --- a/epoc32/include/btdevice.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/btdevice.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// 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.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -35,7 +35,7 @@
1.16 **/
1.17 static const TInt KMaxFriendlyNameLen = 100;
1.18
1.19 -/** Length of a bluetooth device name. Retained for binary compatibility.
1.20 +/** Length of a bluetooth device name. This is not to be used outside of the sub-system. Retained for binary compatibility.
1.21 @internalComponent
1.22 @deprecated
1.23 **/
1.24 @@ -81,12 +81,6 @@
1.25 IMPORT_C static TBTDeviceName ToUnicodeL(const TBTDeviceName8& aName);
1.26 IMPORT_C static TBTDeviceName8 ToUTF8L(const TBTDeviceName& aName);
1.27 };
1.28 -
1.29 -/** Defines the granularity of the arrays used in CBTDevice.
1.30 -@internalComponent
1.31 -@released
1.32 -**/
1.33 -const TInt KSecurityGranularity=1;
1.34
1.35 /** Cleanup utility for CBTDeviceArrays.
1.36
1.37 @@ -400,18 +394,6 @@
1.38 /** Game toy device **/
1.39 EMinorDeviceToyGame = 0x05, //000101
1.40 };
1.41 -
1.42 -
1.43 -/** Minor Device class headset.
1.44 -@deprecated
1.45 -@internalComponent
1.46 -@see TBTMinorDeviceClassAV
1.47 -**/
1.48 -enum TBTMinorDeviceClassHeadset
1.49 - { //7 2
1.50 - EHeadsetUnclassified = 0x0, //000000
1.51 - EHeadsetProfile = 0x1, //000001
1.52 - };
1.53
1.54 /** Encapsulation of device class definitions.
1.55
1.56 @@ -441,12 +423,12 @@
1.57 private:
1.58 static const TUint32 KStreamVersion = 0x00000001;
1.59 private:
1.60 - TUint32 iDeviceClass;
1.61 + TUint32 iDeviceClass;
1.62
1.63 // This data padding has been added to help prevent future binary compatibility breaks
1.64 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.65 - TUint32 iPadding1;
1.66 - TUint32 iPadding2;
1.67 + TUint32 iPadding1;
1.68 + TUint32 iPadding2;
1.69 };
1.70
1.71 /** Class to store the security override parameters for a particular remote device.
1.72 @@ -500,9 +482,9 @@
1.73 /** Enumeration to assist in parsing of security settings. */
1.74 enum TBTDeviceSecuritySettings
1.75 {
1.76 - ENoAuthenticate = 0x01, /*!< Don't authenticate the link */
1.77 - ENoAuthorise = 0x02, /*!< Don't authorise the connection */
1.78 - EEncrypt = 0x04, /*!< Encrypt the link */
1.79 + ENoAuthenticate = 0x01, /*!< Don't authenticate the link @deprecated */
1.80 + ENoAuthorise = 0x02, /*!< Don't authorise the connection */
1.81 + EEncrypt = 0x04, /*!< Encrypt the link */
1.82 EBanned = 0x08, /*!< Don't connect to the device */
1.83 EMitmProtectionRequired = 0x10, /*!< Require the link is MITM protected */
1.84 };
1.85 @@ -511,13 +493,13 @@
1.86 static const TUint32 KStreamVersion = 0x00000001;
1.87
1.88 private:
1.89 - TUint8 iSecurity;
1.90 - TUint iPasskeyMinLength;
1.91 + TUint8 iSecurity;
1.92 + TUint iPasskeyMinLength;
1.93
1.94 // This data padding has been added to help prevent future binary compatibility breaks
1.95 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.96 - TUint32 iPadding1;
1.97 - TUint32 iPadding2;
1.98 + TUint32 iPadding1;
1.99 + TUint32 iPadding2;
1.100 };
1.101
1.102 /** Class to tie a service uid with a device security setting.
1.103 @@ -554,29 +536,9 @@
1.104
1.105 // This data padding has been added to help prevent future binary compatibility breaks
1.106 // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used
1.107 - TUint32 iPadding1;
1.108 - TUint32 iPadding2;
1.109 + TUint32 iPadding1;
1.110 + TUint32 iPadding2;
1.111 };
1.112 -
1.113 -/** For Symbian use only
1.114 -@internalAll
1.115 -*/
1.116 -NONSHARABLE_CLASS(TBTBasebandParameters)
1.117 - {
1.118 -public:
1.119 - IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.120 - IMPORT_C void InternalizeL(RReadStream& aStream);
1.121 -
1.122 - TUint8 iPageScanRepetitionMode; /*!< Page Scan repetition mode of remote device ( valid if > 0 ) */
1.123 - TUint8 iPageScanPeriodMode; /*!< Page scan period mode of remote device */
1.124 - TUint8 iPageScanMode; /*!< Page scan mode of remote device ( valid if > 0 ) */
1.125 - TUint16 iClockOffset; /*!< clock off set of remote device ( valid if > 0 ) */
1.126 -
1.127 -private:
1.128 - static const TUint32 KStreamVersion = 0x00000001;
1.129 - };
1.130 -
1.131 -
1.132
1.133 /** Stores parameters for a nameless device.
1.134
1.135 @@ -589,29 +551,48 @@
1.136 NONSHARABLE_CLASS(TBTNamelessDevice)
1.137 {
1.138 friend class CBTDevice;
1.139 +
1.140 +private:
1.141 + /** For Symbian use only
1.142 + @internalComponent
1.143 + */
1.144 + NONSHARABLE_CLASS(TBTBasebandParameters)
1.145 + {
1.146 + public:
1.147 + void ExternalizeL(RWriteStream& aStream) const;
1.148 + void InternalizeL(RReadStream& aStream);
1.149 +
1.150 + TUint8 iPageScanRepetitionMode; /*!< Page Scan repetition mode of remote device ( valid if > 0 ) */
1.151 + TUint8 iPageScanPeriodMode; /*!< Page scan period mode of remote device */
1.152 + TUint8 iPageScanMode; /*!< Page scan mode of remote device ( valid if > 0 ) */
1.153 + TUint16 iClockOffset; /*!< clock off set of remote device ( valid if > 0 ) */
1.154 +
1.155 + private:
1.156 + static const TUint32 KStreamVersion = 0x00000001;
1.157 + };
1.158 public:
1.159
1.160 - IMPORT_C TBTNamelessDevice();
1.161 - IMPORT_C const TBTDevAddr& Address() const;
1.162 - IMPORT_C const TBTDeviceClass& DeviceClass() const;
1.163 - IMPORT_C const TBTLinkKey& LinkKey() const;
1.164 + IMPORT_C TBTNamelessDevice();
1.165 + IMPORT_C const TBTDevAddr& Address() const;
1.166 + IMPORT_C const TBTDeviceClass& DeviceClass() const;
1.167 + IMPORT_C const TBTLinkKey& LinkKey() const;
1.168 IMPORT_C TBTLinkKeyType LinkKeyType() const;
1.169 - IMPORT_C TUint8 PageScanRepMode() const;
1.170 - IMPORT_C TUint8 PageScanMode() const;
1.171 - IMPORT_C TUint8 PageScanPeriodMode() const;
1.172 - IMPORT_C TUint16 ClockOffset() const;
1.173 - IMPORT_C const TTime& Seen() const;
1.174 - IMPORT_C const TTime& Used() const;
1.175 - IMPORT_C const TBTDeviceSecurity& GlobalSecurity() const;
1.176 - IMPORT_C void SetAddress(const TBTDevAddr& aBDAddr);
1.177 - IMPORT_C void SetDeviceClass(TBTDeviceClass aDeviceClass);
1.178 + IMPORT_C TUint8 PageScanRepMode() const;
1.179 + IMPORT_C TUint8 PageScanMode() const;
1.180 + IMPORT_C TUint8 PageScanPeriodMode() const;
1.181 + IMPORT_C TUint16 ClockOffset() const;
1.182 + IMPORT_C const TTime& Seen() const;
1.183 + IMPORT_C const TTime& Used() const;
1.184 + IMPORT_C const TBTDeviceSecurity& GlobalSecurity() const;
1.185 + IMPORT_C void SetAddress(const TBTDevAddr& aBDAddr);
1.186 + IMPORT_C void SetDeviceClass(TBTDeviceClass aDeviceClass);
1.187 IMPORT_C void SetLinkKey(const TBTLinkKey& aLinkKey);
1.188 IMPORT_C void SetLinkKey(const TBTLinkKey& aLinkKey, TBTLinkKeyType aLinkKeyType);
1.189 IMPORT_C void SetPageScanRepMode(TUint8 aPageScanRepMode);
1.190 IMPORT_C void SetPageScanPeriodMode(TUint8 aPageScanPeriodMode);
1.191 IMPORT_C void SetPageScanMode(TUint8 aPageScanMode);
1.192 IMPORT_C void SetClockOffset(TUint16 aClockOffSet);
1.193 - IMPORT_C void SetGlobalSecurity(const TBTDeviceSecurity& aSetting);
1.194 + IMPORT_C void SetGlobalSecurity(const TBTDeviceSecurity& aSetting);
1.195 IMPORT_C void SetUsed(const TTime& aDateTime);
1.196 IMPORT_C void SetSeen(const TTime& aDateTime);
1.197 IMPORT_C TBool IsValidAddress() const;
1.198 @@ -634,8 +615,8 @@
1.199 IMPORT_C void SetPaired(TBool aPaired);
1.200 IMPORT_C void SetPaired(TBTLinkKeyType aLinkKeyType);
1.201 IMPORT_C TBool IsValidPaired() const;
1.202 - IMPORT_C const TBTPinCode& PassKey() const;
1.203 - IMPORT_C void SetPassKey(const TBTPinCode& aPassKey);
1.204 + IMPORT_C const TBTPinCode& PassKey() const;
1.205 + IMPORT_C void SetPassKey(const TBTPinCode& aPassKey);
1.206 IMPORT_C TBool IsValidPassKey() const;
1.207 IMPORT_C TUint PassKeyLength() const;
1.208 IMPORT_C TBool IsValidUiCookie() const;
1.209 @@ -643,23 +624,24 @@
1.210 IMPORT_C TUint32 UiCookie() const;
1.211
1.212 /** Bitfield of TBTNamelessDevice attributes
1.213 + This enum is to only be used by phone manufacturers, not by application developers.
1.214 @publishedPartner
1.215 @released
1.216 */
1.217 enum TBTDeviceSet
1.218 {
1.219 - EAddress = 0x000001, /*!< Device address */
1.220 - EDeviceClass = 0x000002, /*!< Device class */
1.221 - ELinkKey = 0x000004, /*!< Link key */
1.222 - EGlobalSecurity = 0x000008, /*!< Global security settings */
1.223 - EPageScanRepMode = 0x000010, /*!< Page scan repition mode */
1.224 - EPageScanMode = 0x000020, /*!< Page scan mode */
1.225 - EPageScanPeriodMode = 0x000040, /*!< Page scan period */
1.226 - EClockOffset = 0x000080, /*!< Clock offset */
1.227 - EUsed = 0x000100, /*!< Last used */
1.228 - ESeen = 0x000200, /*!< Last seen */
1.229 - EIsPaired = 0x000400, /*!< Is paired */
1.230 - EPassKey = 0x000800, /*!< PassKey */
1.231 + EAddress = 0x000001, /*!< Device address */
1.232 + EDeviceClass = 0x000002, /*!< Device class */
1.233 + ELinkKey = 0x000004, /*!< Link key */
1.234 + EGlobalSecurity = 0x000008, /*!< Global security settings */
1.235 + EPageScanRepMode = 0x000010, /*!< Page scan repition mode */
1.236 + EPageScanMode = 0x000020, /*!< Page scan mode */
1.237 + EPageScanPeriodMode = 0x000040, /*!< Page scan period */
1.238 + EClockOffset = 0x000080, /*!< Clock offset */
1.239 + EUsed = 0x000100, /*!< Last used */
1.240 + ESeen = 0x000200, /*!< Last seen */
1.241 + EIsPaired = 0x000400, /*!< Is paired */
1.242 + EPassKey = 0x000800, /*!< PassKey */
1.243 EUiCookie = 0x001000, /*!< User interface specific cookie */
1.244
1.245 EAllNamelessProperties = 0x00ffffff, /*!< All nameless properties set */
1.246 @@ -676,14 +658,14 @@
1.247 TTime iUsed; /*!< when last connect from/to */
1.248 TTime iSeen; /*!< when last seen in inquiry */
1.249 TBool iPaired; /*!< Whether this device is paired */
1.250 - TBTPinCode iPassKey; /*!< PassKey */
1.251 + TBTPinCode iPassKey; /*!< PassKey */
1.252 TBTLinkKeyType iLinkKeyType; /*!< Link Key Type */
1.253 TUint32 iUiCookie; /*!< The cookie attached to this device by the UI */
1.254
1.255 - // This data padding has been added to help prevent future binary compatibility breaks
1.256 + // This data padding has been added to help prevent future binary compatibility breaks.
1.257 // iPadding1 has been used for iLinkKeyType
1.258 // iPadding2 has been used for iUiCookie
1.259 - TUint32 iPadding3;
1.260 + TUint32 iPadding3;
1.261 TUint32 iPadding4;
1.262 };
1.263
1.264 @@ -700,10 +682,10 @@
1.265 friend class TBTNamelessDevice;
1.266 public:
1.267
1.268 - IMPORT_C static CBTDevice* NewL(const TBTDevAddr& aBDAddr);
1.269 + IMPORT_C static CBTDevice* NewL(const TBTDevAddr& aBDAddr);
1.270 IMPORT_C static CBTDevice* NewLC(const TBTDevAddr& aBDAddr);
1.271 IMPORT_C static CBTDevice* NewL(const TBTNamelessDevice& aNamelessDevice);
1.272 - IMPORT_C static CBTDevice* NewLC(const TBTNamelessDevice& aNamelessDevice);
1.273 + IMPORT_C static CBTDevice* NewLC(const TBTNamelessDevice& aNamelessDevice);
1.274 IMPORT_C static CBTDevice* NewL();
1.275 IMPORT_C static CBTDevice* NewLC();
1.276 IMPORT_C ~CBTDevice();
1.277 @@ -873,7 +855,7 @@
1.278
1.279 Not a complete set of details of the local device
1.280
1.281 - @publishedPartner
1.282 + @publishedAll
1.283 @released
1.284
1.285 */
1.286 @@ -917,25 +899,25 @@
1.287 ELimitedDiscoverable = 0x0020,
1.288 EAFHChannelAssessmentMode = 0x0040,
1.289 EAcceptPairedOnlyMode = 0x0080,
1.290 - }; ///< Used for indicating if a setting has been set (i.e. not a default/random value) @see iBitMask
1.291 + }; //< Used for indicating if a setting has been set (i.e. not a default/random value) @see iBitMask
1.292
1.293 private:
1.294 enum
1.295 {
1.296 EAFHChannelAssessmentModeValue = 0x0001,
1.297 EAcceptPairedOnlyModeValue = 0x0002,
1.298 - }; ///< Used for settings requiring little space: allows new settings ot be introduced without increasing the size of this class @see iSimpleSettings
1.299 + }; //< Used for settings requiring little space: allows new settings ot be introduced without increasing the size of this class @see iSimpleSettings
1.300
1.301
1.302
1.303 - TUint iSetMask; ///< Bit mask indicating the data members that have been set
1.304 + TUint iSetMask; //< Bit mask indicating the data members that have been set
1.305 TBTDevAddr iAddress;
1.306 TUint32 iCod;
1.307 TBTDeviceName8 iLocalName;
1.308 TUint8 iPowerSetting;
1.309 THCIScanEnable iScanEnable;
1.310 TBool iLimitedDiscoverable;
1.311 - TUint32 iSimpleSettings; ///< Only first two bits currently used - for AFH Channel Assessment Mode, and Accept Paired Only Mode
1.312 + TUint32 iSimpleSettings; //< Only first two bits currently used - for AFH Channel Assessment Mode, and Accept Paired Only Mode
1.313 };
1.314
1.315