Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <btdevice.h>
Link against: btdevice.lib

Class TBTDeviceSecurity

class TBTDeviceSecurity;

Description

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

Members

Defined in TBTDeviceSecurity:


Construction and destruction


TBTDeviceSecurity()

IMPORT_C TBTDeviceSecurity();

Description

Constructor


TBTDeviceSecurity(TUint8)

IMPORT_C TBTDeviceSecurity(TUint8 aSecurity);

Description

Constructor with userdefined security

Parameters

TUint8 aSecurity

bitfield describing security settings

See also:


TBTDeviceSecurity(TUint8,TUint)

IMPORT_C TBTDeviceSecurity(TUint8 aSecurity, TUint aPasskeyMinLength);

Description

Constructor with userdefined security

Parameters

TUint8 aSecurity

bitfield describing security settings

TUint aPasskeyMinLength

0..16

See also:


TBTDeviceSecurity(TBool,TBool,TBool,TBool)

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

Description

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);

Description

Constructor with user-defined security

Parameters

TBTDeviceSecurity::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

[Top]


Member functions


SetNoAuthenticate(TBool)

IMPORT_C void SetNoAuthenticate(TBool aDecision);

Description

Set (no) authentication

Parameters

TBool aDecision

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


SetMitmRequirements(TMitmRequired)

IMPORT_C void SetMitmRequirements(TMitmRequired aDecision);

Description

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

Parameters

TBTDeviceSecurity::TMitmRequired aDecision

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


SetNoAuthorise(TBool)

IMPORT_C void SetNoAuthorise(TBool aDecision);

Description

Set (no) authorisation (=make trusted)

Parameters

TBool aDecision

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


SetEncrypt(TBool)

IMPORT_C void SetEncrypt(TBool aDecision);

Description

Set encryption

Parameters

TBool aDecision

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


SetBanned(TBool)

IMPORT_C void SetBanned(TBool aDecision);

Description

Set banned

Parameters

TBool aDecision

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


NoAuthenticate()const

IMPORT_C TBool NoAuthenticate() const;

Description

Determine whether connections to this device should not be authenticated.

Return value

TBool

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


MitmRequirements()const

IMPORT_C TMitmRequired MitmRequirements() const;

Description

Determine whether connections to this device should have MITM protection.

Return value

TBTDeviceSecurity::TMitmRequired

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


NoAuthorise()const

IMPORT_C TBool NoAuthorise() const;

Description

Determine whether connections to this device should not be authorised.

Return value

TBool

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


Encrypt()const

IMPORT_C TBool Encrypt() const;

Description

Determine whether connections to this device should be encrypted.

Return value

TBool

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


Banned()const

IMPORT_C TBool Banned() const;

Description

Determine whether connections to this device should be banned.

Return value

TBool

ETrue=>banned, EFalse=>not banned


PasskeyMinLength()const

IMPORT_C TUint PasskeyMinLength() const;

Description

Get passkey min length.

Return value

TUint

TUint passkey min length


SecurityValue()const

IMPORT_C TUint8 SecurityValue() const;

Description

Get the raw security settings.

Return value

TUint8

8 bit unsigned value of security settings


SetSecurityValue(TUint8)

IMPORT_C void SetSecurityValue(TUint8 aDeviceSecurity);

Description

Set the raw security settings.

Parameters

TUint8 aDeviceSecurity

8 bit settings of security


SetPasskeyMinLength(TUint)

IMPORT_C TInt SetPasskeyMinLength(TUint aPasskeyMinLength);

Description

Set passkey min length.

Parameters

TUint aPasskeyMinLength

Return value

TInt


operator==(const TBTDeviceSecurity &)const

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

Description

Comparison operator

Parameters

const TBTDeviceSecurity &aDeviceSecurity

instance of class with which to compare

Return value

TBool

ETrue if instances equal


operator!=(const TBTDeviceSecurity &)const

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

Description

Inequality operator

Parameters

const TBTDeviceSecurity &aDeviceSecurity

instance of class with which to compare

Return value

TBool

ETrue if instances not equal


ExternalizeL(RWriteStream &)const

IMPORT_C void ExternalizeL(RWriteStream &aStream) const;

Description

Externalise object.

Parameters

RWriteStream &aStream

The stream to which the object shall be externalised.

Leave codes

This

method will leave if an error occurs.


InternalizeL(RReadStream &)

IMPORT_C void InternalizeL(RReadStream &aStream);

Description

Internalise object.

Parameters

RReadStream &aStream

The stream from which the object shall be internalised.

Leave codes

This

method will leave if an error occurs.

[Top]


Member enumerations


Enum TMitmRequired

TMitmRequired

Description

Enumeration to provide select MITM protection required.

EMitmUnspecified

No specific MITM protection requirements

EMitmRequired

Require the link is MITM protected


Enum TBTDeviceSecuritySettings

TBTDeviceSecuritySettings

Description

Enumeration to assist in parsing of security settings.

ENoAuthenticate

Don't authenticate the link

ENoAuthorise

Don't authorise the connection

EEncrypt

Encrypt the link

EBanned

Don't connect to the device

EMitmProtectionRequired

Require the link is MITM protected