BtManaged Class Reference
[Bluetooth Hands-Free Profile Implementation]

Base Class for Bluetooth Reference-Counted Objects. More...

#include <bt.h>

Inheritance diagram for BtManaged:

Inheritance graph
[legend]
Collaboration diagram for BtManaged:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BtManaged (BtHub *hubp)
virtual ~BtManaged (void)
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

Base Class for Bluetooth Reference-Counted Objects.

This class forms the base class of all reference-counted objects used in this module. See also BtDevice life cycle management.

These objects have three standard features:

See also:
BtDevice, BtSession, HfpSession

Constructor & Destructor Documentation

BtManaged ( BtHub hubp  )  [inline]

Standard constructor

~BtManaged ( void   )  [virtual]

Standard destructor


Member Function Documentation

BtHub* GetHub ( void   )  const [inline]

Query the presiding BtHub

DispatchInterface* GetDi ( void   )  const [inline]

Query the dispatcher interface of the presiding BtHub

void* GetPrivate ( void   )  const [inline]

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]

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]

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   ) 

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

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