Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: bt_sock.h
Link against: bluetooth.lib

Class CBluetoothPhysicalLinks

class CBluetoothPhysicalLinks : public CBase;

Description

This is used to enumerate members of piconet, and attach and remove members thereof

It may also be used for non-service dependent reads and writes.

Derivation

Members

Defined in CBluetoothPhysicalLinks:
Broadcast(), CancelCreateConnection(), CreateConnection(), Disconnect(), DisconnectAll(), Enumerate(), NewL(), NewLC(), ReadRaw(), ~CBluetoothPhysicalLinks()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C CBluetoothPhysicalLinks *NewL(MBluetoothPhysicalLinksNotifier &aNotifier, RSocketServ &aServer);

Pre-Condition

A session on the socket server has been started.

Description

Constructor

Opens a Bluetooth socket.

Parameters

MBluetoothPhysicalLinksNotifier &aNotifier

The object which will receive asynchronous events.

RSocketServ &aServer

The socket server.

Return value

CBluetoothPhysicalLinks *

An object of type CBluetoothPhysicalLinks

Leave codes

No

memory, or error on opening socket


NewLC()

static IMPORT_C CBluetoothPhysicalLinks *NewLC(MBluetoothPhysicalLinksNotifier &aNotifier, RSocketServ &aServer);

Pre-Condition

A session on the socket server has been started.

Description

Constructor

Opens a Bluetooth socket.

Parameters

MBluetoothPhysicalLinksNotifier &aNotifier

The object which will receive asynchronous events.

RSocketServ &aServer

The socket server.

Return value

CBluetoothPhysicalLinks *

An object of type CBluetoothPhysicalLinks

Leave codes

No

memory, or error on opening socket


~CBluetoothPhysicalLinks()

IMPORT_C ~CBluetoothPhysicalLinks();

Description

Destructor

[Top]


Member functions


CreateConnection()

IMPORT_C TInt CreateConnection(const TBTDevAddr &aDevAddr);

Description

Bring in a new member to the piconet

This can be useful for preparing for a logical link (service socket). Firstly if the local device has not bonded with the specified remote device, then this function can be used to allow the bonding procedure can take place in advance. Secondly if a CBluetoothSocket call is made to create a logical link within an internally specified time of this CreateConnection function being called, then that link will come up much faster since the physical link will already be in place. Unless this connection is taken up by a logical link (or a synchronous link) within that internally specified time then it will be closed.

This function can also be used to create a physical link ready for the setting up of a synchronous link (e.g. voice link).

Parameters

const TBTDevAddr &aDevAddr

Bluetooth address specifying remote device (new member of piconet)

Return value

TInt

Error code


CancelCreateConnection()

IMPORT_C void CancelCreateConnection();

Description

Cancel bringing in a new member to the piconet


Disconnect()

Capability: NetworkControl

IMPORT_C TInt Disconnect(const TBTDevAddr &aDevAddr);

Description

Disconnect a single member of piconet

Parameters

const TBTDevAddr &aDevAddr

Bluetooth address specifying remote device (member of piconet)

Return value

TInt

Error code


DisconnectAll()

Capability: NetworkControl

IMPORT_C TInt DisconnectAll();

Description

Disconnect all members of piconet

Return value

TInt

Error code


Broadcast()

Capability: NetworkControl

IMPORT_C TInt Broadcast(const TDesC8 &aData);

Description

Write (raw) broadcast data

Raw broadcast data is data that is not directed to any specified service.

Parameters

const TDesC8 &aData

Contains data to be broadcast.

Return value

TInt

Error code


ReadRaw()

Capability: NetworkControl

IMPORT_C TInt ReadRaw(TDes8 &aData);

Description

Receive (raw) broadcast data

Raw broadcast data is data that is not directed to any specified service.

Parameters

TDes8 &aData

Contains data received.

Return value

TInt

Error code


Enumerate()

IMPORT_C TInt Enumerate(RBTDevAddrArray &aBTDevAddrArray, TUint aMaxNumber);

Description

Enumerate connected members of the piconet

Parameters

RBTDevAddrArray &aBTDevAddrArray

Bluetooth device address array to be filled with bluetooth addresses of connected members of the piconet.

TUint aMaxNumber

Upper limit on number of members to be returned.

Return value

TInt

Error code