TBTDeviceSecurity Class Reference

class TBTDeviceSecurity

Class to store the security override parameters for a particular remote device.

Constructor & Destructor Documentation

TBTDeviceSecurity()

IMPORT_C TBTDeviceSecurity ( )

Constructor

TBTDeviceSecurity(TUint8)

IMPORT_C TBTDeviceSecurity ( TUint8 aSecurity )

Constructor with userdefined security SecurityValue()

Parameters

TUint8 aSecurity bitfield describing security settings

TBTDeviceSecurity(TUint8, TUint)

IMPORT_C TBTDeviceSecurity ( TUint8 aSecurity,
TUint aPasskeyMinLength
)

Constructor with userdefined security SecurityValue()

Parameters

TUint8 aSecurity bitfield describing security settings
TUint aPasskeyMinLength 0..16

TBTDeviceSecurity(TBool, TBool, TBool, TBool)

IMPORT_C TBTDeviceSecurity ( TBool aNoAuthenticate,
TBool aNoAuthorise,
TBool aEncrypt,
TBool aBanned
)

Constructor with user-defined security

Parameters

TBool aNoAuthenticate Use ETrue if connections with this device should not be authenticated.
TBool aNoAuthorise Use ETrue if connections with this device should not be authorised - ie the device is trusted.
TBool aEncrypt Use ETrue if connections with this device should be encrypted
TBool aBanned Use ETrue if connections with this device should not be allowed

TBTDeviceSecurity(TMitmRequired, TBool, TBool, TBool)

IMPORT_C TBTDeviceSecurity ( TMitmRequired aMitmRequirements,
TBool aNoAuthorise,
TBool aEncrypt,
TBool aBanned
)

Constructor with user-defined security

Parameters

TMitmRequired aMitmRequirements Use TBTDeviceSecurity::EMitmRequired if connections with this device should require MITM protection.
TBool aNoAuthorise Use ETrue if connections with this device should not be authorised - ie the device is trusted.
TBool aEncrypt Use ETrue if connections with this device should be encrypted
TBool aBanned Use ETrue if connections with this device should not be allowed

Member Functions Documentation

Banned()

IMPORT_C TBool Banned ( ) const

Determine whether connections to this device should be banned.

Encrypt()

IMPORT_C TBool Encrypt ( ) const

Determine whether connections to this device should be encrypted.

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const
Externalise object.
leave
This method will leave if an error occurs.

Parameters

RWriteStream & aStream The stream to which the object shall be externalised.

InternalizeL(RReadStream &)

IMPORT_C void InternalizeL ( RReadStream & aStream )
Internalise object.
leave
This method will leave if an error occurs.

Parameters

RReadStream & aStream The stream from which the object shall be internalised.

MitmRequirements()

IMPORT_C TMitmRequired MitmRequirements ( ) const

Determine whether connections to this device should have MITM protection.

NoAuthenticate()

IMPORT_C TBool NoAuthenticate ( ) const

Determine whether connections to this device should not be authenticated.

NoAuthorise()

IMPORT_C TBool NoAuthorise ( ) const

Determine whether connections to this device should not be authorised.

PasskeyMinLength()

IMPORT_C TUint PasskeyMinLength ( ) const

Get passkey min length.

SecurityValue()

IMPORT_C TUint8 SecurityValue ( ) const

Get the raw security settings.

SetBanned(TBool)

IMPORT_C void SetBanned ( TBool aDecision )

Set banned

Parameters

TBool aDecision ETrue=>device is banned, EFalse=>device allowed

SetEncrypt(TBool)

IMPORT_C void SetEncrypt ( TBool aDecision )

Set encryption

Parameters

TBool aDecision ETrue=>encrypt, EFalse=>don't encrypt

SetMitmRequirements(TMitmRequired)

IMPORT_C void SetMitmRequirements ( TMitmRequired aDecision )

Specifies the man-in-the-middle requirements on a security service.

Parameters

TMitmRequired aDecision EMitmRequired if MITM protection is required for connections for a particular device, EMitmUnspecified otherwise to use the default service requirements.

SetNoAuthenticate(TBool)

IMPORT_C void SetNoAuthenticate ( TBool aDecision )

Set (no) authentication

Parameters

TBool aDecision ETrue=>don't authenticate, EFalse=>authenticate

SetNoAuthorise(TBool)

IMPORT_C void SetNoAuthorise ( TBool aDecision )

Set (no) authorisation (=make trusted)

Parameters

TBool aDecision ETrue=>don't authorise, EFalse=>authorise

SetPasskeyMinLength(TUint)

IMPORT_C TInt SetPasskeyMinLength ( TUint aPasskeyMinLength )

Set passkey min length.

Parameters

TUint aPasskeyMinLength

SetSecurityValue(TUint8)

IMPORT_C void SetSecurityValue ( TUint8 aDeviceSecurity )

Set the raw security settings.

Parameters

TUint8 aDeviceSecurity 8 bit settings of security

operator!=(const TBTDeviceSecurity &)

IMPORT_C TBool operator!= ( const TBTDeviceSecurity & aDeviceSecurity ) const

Inequality operator

Parameters

const TBTDeviceSecurity & aDeviceSecurity instance of class with which to compare

operator==(const TBTDeviceSecurity &)

IMPORT_C TBool operator== ( const TBTDeviceSecurity & aDeviceSecurity ) const

Comparison operator

Parameters

const TBTDeviceSecurity & aDeviceSecurity instance of class with which to compare

Member Enumerations Documentation

Enum TBTDeviceSecuritySettings

Enumeration to assist in parsing of security settings.

Enumerators

ENoAuthenticate = 0x01

Don't authenticate the link

ENoAuthorise = 0x02

Don't authorise the connection

EEncrypt = 0x04

Encrypt the link

EBanned = 0x08

Don't connect to the device

EMitmProtectionRequired = 0x10

Require the link is MITM protected

Enum TMitmRequired

Enumeration to provide select MITM protection required.

Enumerators

EMitmUnspecified

No specific MITM protection requirements

EMitmRequired

Require the link is MITM protected

Member Data Documentation

const TUint32 KStreamVersion

const TUint32 KStreamVersion [private, static]

TUint32 iPadding1

TUint32 iPadding1 [private]

TUint32 iPadding2

TUint32 iPadding2 [private]

TUint iPasskeyMinLength

TUint iPasskeyMinLength [private]

TUint8 iSecurity

TUint8 iSecurity [private]