#include <bt.h>
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. | |
BtHub * | GetHub (void) const |
DispatchInterface * | GetDi (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. |
This class represents a locally attached Bluetooth module, typically a module integrated into a laptop or a USB dongle.
bdaddr_t const& GetAddr | ( | void | ) | const [inline] |
Query the Bluetooth address 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.
[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. |
0 | Success. | |
<0 | Failure. The returned value is a negative errno value, e.g. -ESHUTDOWN. |
bool SetScoVoiceSetting | ( | uint16_t | vs, | |
ErrorInfo * | error = 0 | |||
) |
Set the SCO voice setting of the HCI.
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.
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.
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.
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.
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.