#include <btdevice.h>
class TBTDeviceSecurity |
Public Member Enumerations | |
---|---|
enum | TBTDeviceSecuritySettings { ENoAuthenticate, ENoAuthorise, EEncrypt, EBanned, EMitmProtectionRequired } |
enum | TMitmRequired { EMitmUnspecified, EMitmRequired } |
Public Member Functions | |
---|---|
TBTDeviceSecurity() | |
TBTDeviceSecurity(TUint8) | |
TBTDeviceSecurity(TUint8, TUint) | |
TBTDeviceSecurity(TBool, TBool, TBool, TBool) | |
TBTDeviceSecurity(TMitmRequired, TBool, TBool, TBool) | |
IMPORT_C TBool | Banned() |
IMPORT_C TBool | Encrypt() |
IMPORT_C void | ExternalizeL(RWriteStream &) |
IMPORT_C void | InternalizeL(RReadStream &) |
IMPORT_C TMitmRequired | MitmRequirements() |
IMPORT_C TBool | NoAuthenticate() |
IMPORT_C TBool | NoAuthorise() |
IMPORT_C TUint | PasskeyMinLength() |
IMPORT_C TUint8 | SecurityValue() |
IMPORT_C void | SetBanned(TBool) |
IMPORT_C void | SetEncrypt(TBool) |
IMPORT_C void | SetMitmRequirements(TMitmRequired) |
IMPORT_C void | SetNoAuthenticate(TBool) |
IMPORT_C void | SetNoAuthorise(TBool) |
IMPORT_C TInt | SetPasskeyMinLength(TUint) |
IMPORT_C void | SetSecurityValue(TUint8) |
IMPORT_C TBool | operator!=(const TBTDeviceSecurity &) |
IMPORT_C TBool | operator==(const TBTDeviceSecurity &) |
Class to store the security override parameters for a particular remote device.
Enumeration to assist in parsing of security settings.
Enumerator | Value | Description |
---|---|---|
ENoAuthenticate | 0x01 |
Don't authenticate the link Deprecated |
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 |
IMPORT_C | TBTDeviceSecurity | ( | TUint8 | aSecurity | ) |
Constructor with userdefined security
See also: SecurityValue()
Parameter | Description |
---|---|
aSecurity | bitfield describing security settings |
Constructor with userdefined security
See also: SecurityValue()
Parameter | Description |
---|---|
aSecurity | bitfield describing security settings |
aPasskeyMinLength | 0..16 |
Constructor with user-defined security
Parameter | Description |
---|---|
aNoAuthenticate | Use ETrue if connections with this device should not be authenticated. |
aNoAuthorise | Use ETrue if connections with this device should not be authorised - ie the device is trusted. |
aEncrypt | Use ETrue if connections with this device should be encrypted |
aBanned | Use ETrue if connections with this device should not be allowed |
IMPORT_C | TBTDeviceSecurity | ( | TMitmRequired | aMitmRequirements, |
TBool | aNoAuthorise, | |||
TBool | aEncrypt, | |||
TBool | aBanned | |||
) |
Constructor with user-defined security
Parameter | Description |
---|---|
aMitmRequirements | Use TBTDeviceSecurity::EMitmRequired if connections with this device should require MITM protection. |
aNoAuthorise | Use ETrue if connections with this device should not be authorised - ie the device is trusted. |
aEncrypt | Use ETrue if connections with this device should be encrypted |
aBanned | Use ETrue if connections with this device should not be allowed |
IMPORT_C TBool | Banned | ( | ) | const |
Determine whether connections to this device should be banned.
Returns: ETrue=>banned, EFalse=>not banned
IMPORT_C TBool | Encrypt | ( | ) | const |
Determine whether connections to this device should be encrypted.
Returns: ETrue=>encrypt, EFalse=>don't encrypt
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Parameter | Description |
---|---|
aStream | The stream to which the object shall be externalised. |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
Parameter | Description |
---|---|
aStream | The stream from which the object shall be internalised. |
IMPORT_C TMitmRequired | MitmRequirements | ( | ) | const |
Determine whether connections to this device should have MITM protection.
Returns: TBTDeviceSecurity::EMitmRequired=>require MITM protection, TBTDeviceSecurity::EMitmUnspecified=>unspecified MITM protection requirement.
IMPORT_C TBool | NoAuthenticate | ( | ) | const |
Determine whether connections to this device should not be authenticated.
Returns: ETrue=>don't authenticate, EFalse=>authenticate
IMPORT_C TBool | NoAuthorise | ( | ) | const |
Determine whether connections to this device should not be authorised.
Returns: ETrue=>don't authorise, EFalse=>authorisation
IMPORT_C TUint8 | SecurityValue | ( | ) | const |
Get the raw security settings.
Returns: 8 bit unsigned value of security settings
IMPORT_C void | SetBanned | ( | TBool | aDecision | ) |
Set banned
Parameter | Description |
---|---|
aDecision | ETrue=>device is banned, EFalse=>device allowed |
IMPORT_C void | SetEncrypt | ( | TBool | aDecision | ) |
Set encryption
Parameter | Description |
---|---|
aDecision | ETrue=>encrypt, EFalse=>don't encrypt |
IMPORT_C void | SetMitmRequirements | ( | TMitmRequired | aDecision | ) |
Specifies the man-in-the-middle requirements on a security service.
Parameter | Description |
---|---|
aDecision | EMitmRequired if MITM protection is required for connections for a particular device, EMitmUnspecified otherwise to use the default service requirements. |
IMPORT_C void | SetNoAuthenticate | ( | TBool | aDecision | ) |
Set (no) authentication
Parameter | Description |
---|---|
aDecision | ETrue=>don't authenticate, EFalse=>authenticate |
IMPORT_C void | SetNoAuthorise | ( | TBool | aDecision | ) |
Set (no) authorisation (=make trusted)
Parameter | Description |
---|---|
aDecision | ETrue=>don't authorise, EFalse=>authorise |
IMPORT_C void | SetSecurityValue | ( | TUint8 | aDeviceSecurity | ) |
Set the raw security settings.
Parameter | Description |
---|---|
aDeviceSecurity | 8 bit settings of security |
IMPORT_C TBool | operator!= | ( | const TBTDeviceSecurity & | aDeviceSecurity | ) | const |
Inequality operator
Parameter | Description |
---|---|
aDeviceSecurity | instance of class with which to compare |
Returns: ETrue if instances not equal
IMPORT_C TBool | operator== | ( | const TBTDeviceSecurity & | aDeviceSecurity | ) | const |
Comparison operator
Parameter | Description |
---|---|
aDeviceSecurity | instance of class with which to compare |
Returns: ETrue if instances equal