Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <BTDefCommPort.h>
Link against: btmanclient.lib
This item is not part of the S60 5th Edition SDK

Class TBTCommPortSettings

class TBTCommPortSettings;

Description

Used to configure a virtual serial port. The very least that is needed to configure a virtual serial port is the Bluetooth device address of the remote, and the SDP UUID to use on that device.

This info can then be saved by the registry and retrieved when needed.

Members

Defined in TBTCommPortSettings:


Construction and destruction


TBTCommPortSettings(const TDesC &,TUUID,TUint32,TUint8,TBTDevAddr)

IMPORT_C TBTCommPortSettings(const TDesC &aName, TUUID aUUID, TUint32 aBTCommPort, TUint8 aSecurityLevel, TBTDevAddr aBDAddr);

Description

Constructor

Parameters

const TDesC16 &aName

The name of the virtual serial port

TUUID aUUID

the UUID to use on the remote device

TUint32 aBTCommPort

The virtual serial port number

TUint8 aSecurityLevel

The Bluetooth security desired for the connection

TBTDevAddr aBDAddr

The Bluetooth device address of the remote device


TBTCommPortSettings()

IMPORT_C TBTCommPortSettings();

Description

Default constructor

[Top]


Member functions


Name()const

IMPORT_C const TDesC& Name() const;

Description

Returns the name of the service.

Getter for the name of the virtual serial port

Return value

const TDesC16 &

name of virtual serial port


UUID()const

IMPORT_C TUUID UUID() const;

Description

Returns the unique id of the service.

Getter for the UUID of the virtual serial port

Return value

TUUID

UUID of virtual serial port


BDAddr()const

IMPORT_C TBTDevAddr BDAddr() const;

Description

Returns the address of the default device associated with the service.

Getter for the remote device address of the virtual serial port

Return value

TBTDevAddr

remote device address of the virtual serial port


Port()const

IMPORT_C TUint32 Port() const;

Description

Getter for the port number of the virtual serial port

Return value

TUint32

port number of virtual serial port


IsSecuritySet()const

IMPORT_C TBool IsSecuritySet() const;

Description

Getter to return whether any security level is set

Return value

TBool

EFalse if no security has been set, otherwise ETrue


IsEncryptionSet()const

IMPORT_C TBool IsEncryptionSet() const;

Description

Getter to return whether encryption has been set for the virtual serial port connection

Return value

TBool

ETrue if encryption has been set, otherwise EFalse


IsAuthenticationOnlySet()const

IMPORT_C TBool IsAuthenticationOnlySet() const;

Description

Getter to return whether only authentication has been set for the virtual serial port connection

Return value

TBool

ETrue if only authentication has been set, otherwise EFalse


SetName(const TDesC &)

IMPORT_C void SetName(const TDesC &aName);

Description

Sets the name of the service.

Setter for the name of the virtual serial port

Parameters

const TDesC16 &aName

name of the virtual serial port


SetUUID(TUUID)

IMPORT_C void SetUUID(TUUID aUUID);

Description

Sets the unique id of the service.

Setter for the UUID of the virtual serial port

Parameters

TUUID aUUID

UUID of the virtual serial port


SetPort(TUint32)

IMPORT_C void SetPort(TUint32 aBTCommPort);

Description

Setter for the port number of the virtual serial port

Parameters

TUint32 aBTCommPort

port number of the virtual serial port


SetAuthentication()

IMPORT_C void SetAuthentication();

Description

Setter to request authentication of the virtual serial connection when connection occurs


SetAuthenticationAndEncryption()

IMPORT_C void SetAuthenticationAndEncryption();

Description

Setter to request authentication and encryption of the virtual serial connection when connection occurs


SetNoSecurity()

IMPORT_C void SetNoSecurity();

Description

Setter to clear any setting of security settings


SetBTAddr(TBTDevAddr)

IMPORT_C void SetBTAddr(TBTDevAddr aBDAddr);

Description

Sets the address of the default device associated with the service.

Setter for the remote device address of the virtual serial port

Parameters

TBTDevAddr aBDAddr

remote device address of the virtual serial port


SecurityLevel()const

IMPORT_C TUint8 SecurityLevel() const;

Description

Getter for the security level of the virtual serial port

Return value

TUint8

the level

See also:


SetSecurityLevel(TUint8)

IMPORT_C void SetSecurityLevel(TUint8 aLevel);

Description

Sets the security level for this default service.

Parameters

TUint8 aLevel

the security level: KBTDefaultServiceSecurityNone = 0; KBTDefaultServiceSecurityAuthenticateOnly = 1; KBTDefaultServiceSecurityAuthenticateAndEncrypt = 2;