BtHci Class Reference
[Bluetooth Hands-Free Profile Implementation]

Bluetooth Local Adapter Record. More...

#include <bt.h>

Inheritance diagram for BtHci:

Inheritance graph
[legend]
Collaboration diagram for BtHci:

Collaboration graph
[legend]

List of all members.

Public Member Functions

bdaddr_t const & GetAddr (void) const
 Query the Bluetooth address of the HCI.
bool Queue (HciTask *in_task, ErrorInfo *error=0)
 Submit an HCI task to be executed.
void Cancel (HciTask *taskp)
 Cancel a pending HCI task.
bool GetScoMtu (uint16_t &mtu, uint16_t &pkts, ErrorInfo *error=0)
 Query the configured SCO MTU of the HCI.
bool SetScoMtu (uint16_t mtu, uint16_t pkts, ErrorInfo *error=0)
 Set the SCO MTU of the HCI.
bool GetScoVoiceSetting (uint16_t &vs, ErrorInfo *error=0)
 Query the configured SCO voice setting of the HCI.
bool SetScoVoiceSetting (uint16_t vs, ErrorInfo *error=0)
 Set the SCO voice setting of the HCI.
BtHubGetHub (void) const
DispatchInterfaceGetDi (void) const
void * GetPrivate (void) const
 Query the private pointer associated with the object.
void SetPrivate (void *priv)
 Assign the private pointer associated with the object.
void Get (void)
 Increment the reference count.
void Put (void)
 Decrement the reference count.

Public Attributes

Callback< void, BtManaged * > cb_NotifyDestroy
 Object destruction notification callback.


Detailed Description

Bluetooth Local Adapter Record.

This class represents a locally attached Bluetooth module, typically a module integrated into a laptop or a USB dongle.


Member Function Documentation

bdaddr_t const& GetAddr ( void   )  const [inline]

Query the Bluetooth address of the HCI.

Returns:
A reference to a bdaddr_t containing the Bluetooth address of the HCI. Can be passed as an argument to bacmp() and ba2str().

bool SetScoMtu ( uint16_t  mtu,
uint16_t  pkts,
ErrorInfo error = 0 
)

Set the SCO MTU of the HCI.

Note:
The kernel BlueZ components require superuser access in order to execute this command.

bool GetScoVoiceSetting ( uint16_t &  vs,
ErrorInfo error = 0 
)

Query the configured SCO voice setting of the HCI.

Parameters:
[out] vs On success, a bit field value containing the voice setting of the HCI is stored in this parameter.
[out] error Error information structure. If this method fails and returns false, and error is not 0, error will be filled out with information on the cause of the failure.
Return values:
0 Success.
<0 Failure. The returned value is a negative errno value, e.g. -ESHUTDOWN.
See also:
Bluetooth specification version 2.1, volume 2, section 6.12 for more information on the format of vs.

bool SetScoVoiceSetting ( uint16_t  vs,
ErrorInfo error = 0 
)

Set the SCO voice setting of the HCI.

Note:
The kernel BlueZ components require superuser access in order to execute this command.

BtHub* GetHub ( void   )  const [inline, inherited]

Query the presiding BtHub

DispatchInterface* GetDi ( void   )  const [inline, inherited]

Query the dispatcher interface of the presiding BtHub

void* GetPrivate ( void   )  const [inline, inherited]

Query the private pointer associated with the object.

All BtManaged derived objects have a single pointer field reserved for the use of clients. It is always initialized to zero when the object is constructed, and clients may assign it as they wish.

Returns:
The current value of the private pointer

void SetPrivate ( void *  priv  )  [inline, inherited]

Assign the private pointer associated with the object.

All BtManaged derived objects have a single pointer field reserved for the use of clients. It is always initialized to zero when the object is constructed, and clients may assign it as they wish.

Parameters:
priv New value to assign to the private pointer

void Get ( void   )  [inline, inherited]

Increment the reference count.

As per managed objects, BtManaged derived objects are not deleted so long as they have a positive reference count.

See also:
Put()

void Put ( void   )  [inherited]

Decrement the reference count.

As per managed objects, when the object's reference count reaches zero, the object will be destroyed in the context of a timer event.

See also:
Get()


Member Data Documentation

Callback<void, BtManaged*> cb_NotifyDestroy [inherited]

Object destruction notification callback.

This callback is invoked proir to deletion of the managed object, so that clients may release associated resources. This callback occurs in the context of a timer event, and complies with the rule of not invoking client callbacks in a nested fashion.

The decision to destroy the object is final. The client may not attempt to preserve the object by acquiring additional references from this callback.


The documentation for this class was generated from the following files:
Generated on Fri Jan 9 05:58:37 2009 for libhfp by  doxygen 1.5.4