TBTDeviceSecurity Class Reference

#include <btdevice.h>

Link against: btdevice.lib

class TBTDeviceSecurity

Detailed Description

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

Member Enumeration Documentation

Enum TBTDeviceSecuritySettings

Enumeration to assist in parsing of security settings.

EnumeratorValueDescription
ENoAuthenticate0x01

Don't authenticate the link Deprecated

ENoAuthorise0x02

Don't authorise the connection

EEncrypt0x04

Encrypt the link

EBanned0x08

Don't connect to the device

EMitmProtectionRequired0x10

Require the link is MITM protected

Enum TMitmRequired

Enumeration to provide select MITM protection required.

EnumeratorValueDescription
EMitmUnspecified

No specific MITM protection requirements

EMitmRequired

Require the link is MITM protected

Constructor & Destructor Documentation

TBTDeviceSecurity ( )

IMPORT_CTBTDeviceSecurity()

Constructor

TBTDeviceSecurity ( TUint8 )

IMPORT_CTBTDeviceSecurity(TUint8aSecurity)

Constructor with userdefined security

See also: SecurityValue()

ParameterDescription
aSecuritybitfield describing security settings

TBTDeviceSecurity ( TUint8, TUint )

IMPORT_CTBTDeviceSecurity(TUint8aSecurity,
TUintaPasskeyMinLength
)

Constructor with userdefined security

See also: SecurityValue()

ParameterDescription
aSecuritybitfield describing security settings
aPasskeyMinLength0..16

TBTDeviceSecurity ( TBool, TBool, TBool, TBool )

IMPORT_CTBTDeviceSecurity(TBoolaNoAuthenticate,
TBoolaNoAuthorise,
TBoolaEncrypt,
TBoolaBanned
)

Constructor with user-defined security

ParameterDescription
aNoAuthenticateUse ETrue if connections with this device should not be authenticated.
aNoAuthoriseUse ETrue if connections with this device should not be authorised - ie the device is trusted.
aEncryptUse ETrue if connections with this device should be encrypted
aBannedUse ETrue if connections with this device should not be allowed

TBTDeviceSecurity ( TMitmRequired, TBool, TBool, TBool )

IMPORT_CTBTDeviceSecurity(TMitmRequiredaMitmRequirements,
TBoolaNoAuthorise,
TBoolaEncrypt,
TBoolaBanned
)

Constructor with user-defined security

ParameterDescription
aMitmRequirementsUse TBTDeviceSecurity::EMitmRequired if connections with this device should require MITM protection.
aNoAuthoriseUse ETrue if connections with this device should not be authorised - ie the device is trusted.
aEncryptUse ETrue if connections with this device should be encrypted
aBannedUse ETrue if connections with this device should not be allowed

Member Function Documentation

Banned ( )

IMPORT_C TBoolBanned()const

Determine whether connections to this device should be banned.

Returns: ETrue=>banned, EFalse=>not banned

Encrypt ( )

IMPORT_C TBoolEncrypt()const

Determine whether connections to this device should be encrypted.

Returns: ETrue=>encrypt, EFalse=>don't encrypt

ExternalizeL ( RWriteStream & )

IMPORT_C voidExternalizeL(RWriteStream &aStream)const
Externalise object.
leave
This method will leave if an error occurs.
ParameterDescription
aStreamThe stream to which the object shall be externalised.

InternalizeL ( RReadStream & )

IMPORT_C voidInternalizeL(RReadStream &aStream)
Internalise object.
leave
This method will leave if an error occurs.
ParameterDescription
aStreamThe stream from which the object shall be internalised.

MitmRequirements ( )

IMPORT_C TMitmRequiredMitmRequirements()const

Determine whether connections to this device should have MITM protection.

Returns: TBTDeviceSecurity::EMitmRequired=>require MITM protection, TBTDeviceSecurity::EMitmUnspecified=>unspecified MITM protection requirement.

NoAuthenticate ( )

IMPORT_C TBoolNoAuthenticate()const

Determine whether connections to this device should not be authenticated.

Returns: ETrue=>don't authenticate, EFalse=>authenticate

NoAuthorise ( )

IMPORT_C TBoolNoAuthorise()const

Determine whether connections to this device should not be authorised.

Returns: ETrue=>don't authorise, EFalse=>authorisation

PasskeyMinLength ( )

IMPORT_C TUintPasskeyMinLength()const

Get passkey min length.

Returns: TUint passkey min length

SecurityValue ( )

IMPORT_C TUint8SecurityValue()const

Get the raw security settings.

Returns: 8 bit unsigned value of security settings

SetBanned ( TBool )

IMPORT_C voidSetBanned(TBoolaDecision)

Set banned

ParameterDescription
aDecisionETrue=>device is banned, EFalse=>device allowed

SetEncrypt ( TBool )

IMPORT_C voidSetEncrypt(TBoolaDecision)

Set encryption

ParameterDescription
aDecisionETrue=>encrypt, EFalse=>don't encrypt

SetMitmRequirements ( TMitmRequired )

IMPORT_C voidSetMitmRequirements(TMitmRequiredaDecision)

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

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

SetNoAuthenticate ( TBool )

IMPORT_C voidSetNoAuthenticate(TBoolaDecision)

Set (no) authentication

ParameterDescription
aDecisionETrue=>don't authenticate, EFalse=>authenticate

SetNoAuthorise ( TBool )

IMPORT_C voidSetNoAuthorise(TBoolaDecision)

Set (no) authorisation (=make trusted)

ParameterDescription
aDecisionETrue=>don't authorise, EFalse=>authorise

SetPasskeyMinLength ( TUint )

IMPORT_C TIntSetPasskeyMinLength(TUintaPasskeyMinLength)

Set passkey min length.

SetSecurityValue ( TUint8 )

IMPORT_C voidSetSecurityValue(TUint8aDeviceSecurity)

Set the raw security settings.

ParameterDescription
aDeviceSecurity8 bit settings of security

operator!= ( const TBTDeviceSecurity & )

IMPORT_C TBooloperator!=(const TBTDeviceSecurity &aDeviceSecurity)const

Inequality operator

ParameterDescription
aDeviceSecurityinstance of class with which to compare

Returns: ETrue if instances not equal

operator== ( const TBTDeviceSecurity & )

IMPORT_C TBooloperator==(const TBTDeviceSecurity &aDeviceSecurity)const

Comparison operator

ParameterDescription
aDeviceSecurityinstance of class with which to compare

Returns: ETrue if instances equal