Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: bt_sock.h
Link against: bluetooth.lib

Class TBTServiceSecurity

class TBTServiceSecurity;

Description

The security settings of a bluetooth service.

Contains information regarding the service UID and the access requirements.

Members

Defined in TBTServiceSecurity:
AuthenticationRequired(), AuthorisationRequired(), Denied(), EncryptionRequired(), PasskeyMinLength(), SetAuthentication(), SetAuthorisation(), SetDenied(), SetEncryption(), SetPasskeyMinLength(), SetUid(), TBTServiceSecurity(), TBTServiceSecurity(), Uid()


Construction and destruction


TBTServiceSecurity()

IMPORT_C TBTServiceSecurity(const TBTServiceSecurity &aService);

Description

Copy constructor

Parameters

const TBTServiceSecurity &aService


TBTServiceSecurity()

IMPORT_C TBTServiceSecurity();

Description

Default constructor. Sets all member data to 0.

[Top]


Member functions


SetUid()

IMPORT_C void SetUid(TUid aUid);

Description

Set Uid of the service - used opaquely by Bluetooth system.

When a security procedure is initiated the Uid may be given to the notifier framework. The notifier can then use the Uid to produce a displayable string detailing the service to which the security procudure pertains.

Parameters

TUid aUid

The uid of the service. This is not the Bluetooth UUID, but is a Symbian-allocated Uid.


SetAuthentication()

IMPORT_C void SetAuthentication(TBool aPreference);

Description

Sets whether or not any connections to this service need to be authenticated.

Authentication involves the comparison of a stored link key. If no link key has been generated and stored (e.g. the remote device has never been authenticated before) then the user will be asked to enter a pin code. If authentication fails, the connection will not be permitted.

Parameters

TBool aPreference


SetAuthorisation()

IMPORT_C void SetAuthorisation(TBool aPreference);

Description

Sets whether or not any connections to this service need to be authorised.

A dialog will be presented to the user alerting them of the connection. This will occur for every connection to this service unless the user has explicitly expressed their trust for the remote device during a previous connection. Note: it should not be assumed that the UI will support the setting up of trust for remote devices.

Parameters

TBool aPreference


SetEncryption()

IMPORT_C void SetEncryption(TBool aPreference);

Description

Sets whether or not any connections to this service need to be encrypted.

Authentication must precede encryption, therefore it is recommended that SetAuthentication(ETrue) is also called. If encryption fails, the connection will not be permitted.

Parameters

TBool aPreference


SetDenied()

IMPORT_C void SetDenied(TBool aPreference);

Description

Sets whether or not connections to this service are being denied to all but specified devices.

Parameters

TBool aPreference


SetPasskeyMinLength()

IMPORT_C TInt SetPasskeyMinLength(TUint aPasskeyMinLength);

Description

Sets the minimum of passkey length for connection.

Parameters

TUint aPasskeyMinLength

Return value

TInt


AuthorisationRequired()

IMPORT_C TBool AuthorisationRequired() const;

Description

Getter - return whether authorisation is required for this service

Return value

TBool

EAuthorise if authorisation is required, zero otherwise


EncryptionRequired()

IMPORT_C TBool EncryptionRequired() const;

Description

Getter - return whether encryption is required for this service.

Return value

TBool

EEncrypt if encryption is required, zero otherwise


AuthenticationRequired()

IMPORT_C TBool AuthenticationRequired() const;

Description

Getter - return whether authentication is required for this service.

Return value

TBool

EAuthenticate if authentication is required, zero otherwise


Denied()

IMPORT_C TBool Denied() const;

Description

Getter - return whether denied for this service.

Return value

TBool

EDenied if denied, zero otherwise


PasskeyMinLength()

IMPORT_C TUint PasskeyMinLength() const;

Description

Getter - return minimal passkey length requirement

Return value

TUint

0 - no passkey length requirement. 1..16


Uid()

IMPORT_C TUid Uid() const;

Description

Getter - return Uid for this service.

Return value

TUid

Uid