Location:
btmanclient.h
Link against: bluetooth.lib
TBTServiceSecurity
Supported from 6.1
Security settings of a Bluetooth service.
Contains information regarding the:
Service UID: a unique identifier allowing the security manager to identify the service
Protocol ID: the ID of the protocol layer below the service. For most Bluetooth services, this
is RFCOMM. The ID is specified as a Bluetooth socket level option constant, e.g. KSolBtRFCOMM
.
Channel ID: the channel (or port) on which the service is running. For most Bluetooth services, this is the RFCOMM DLCI.
Access requirements: whether an incoming service is required to meet authentication, authorisation, or encryption requirements.
Defined in TBTServiceSecurity
:
AuthenticationRequired()
, AuthorisationRequired()
, ChannelID()
, Denied()
, EncryptionRequired()
, ProtocolID()
, SetAuthentication()
, SetAuthorisation()
, SetChannelID()
, SetDenied()
, SetEncryption()
, SetProtocolID()
, SetUid()
, TBTServiceSecurity()
, Uid()
TBTServiceSecurity(TUid aUid, TInt aProtocolID, TInt aChannelID);
Constructor with service UID, and protocol and channel IDs.
|
TBTServiceSecurity(const TBTServiceSecurity& aService);
Copy constructor.
|
TBool AuthenticationRequired() const;
Gets whether an incoming service must perform authentication.
|
TBool AuthorisationRequired() const;
Gets whether an incoming service must be authorised.
|
TBool Denied() const;
Gets whether all access requests to this service will be denied by the Security Manager.
|
TBool EncryptionRequired() const;
Gets whether any incoming connections must be encrypted.
|
void SetAuthentication(TBool aPreference);
Sets that any connections to this service must 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.
|
void SetAuthorisation(TBool aPreference);
Sets that any connections to this service must be authorised by the user.
After this setting is made, when a remote device attempts to connect to this service, a dialog will appear on the local machine alerting the user to 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. It should not be assumed that the UI will support the setting up of trust for remote devices.
|
void SetEncryption(TBool aPreference);
Sets that any connections to this service must be encrypted.
Authentication must precede encryption, therefore it is recommended that authentication is also set.
If encryption fails, the connection will not be permitted.
|
void SetChannelID(TInt aChannelID);
Sets the channel ID.
|
void SetDenied(TBool aPreference);
Sets whether any access to this service is allowed.
|
void SetProtocolID(TInt aProtocolID);
Sets the protocol ID.
|
void SetUid(TUid aUid);
Sets the service UID.
|