Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
DBTEndpoint Class Referenceabstract

#include <dbt_endpoint.hpp>

Inheritance diagram for DBTEndpoint:
Collaboration diagram for DBTEndpoint:

Public Member Functions

virtual ~DBTEndpoint ()=default
 
virtual void close (const std::string &msg)=0
 
virtual BTAdapterRef getAdapter ()=0
 Return the adapter for this endpoint. More...
 
virtual int getDisconnectCount ()=0
 
virtual std::string getName ()=0
 Return name of this endpoint, which becomes the adapter's name. More...
 
virtual int getProtocolSessionsDoneSuccess ()=0
 
virtual int getProtocolSessionsDoneTotal ()=0
 
virtual int getProtocolSessionsLeft ()=0
 
virtual bool initAdapter (BTAdapterRef adapter)=0
 Initialize the given adapter for this endpoint. More...
 
virtual void setAdapter (BTAdapterRef a)=0
 Set the server adapter for this endpoint. More...
 
virtual void setProtocolSessionsLeft (const int v)=0
 

Static Public Member Functions

static void checkInitializedState (const DBTEndpointRef &endp)
 
static ChangedAdapterSetCallback initChangedAdapterSetListener (const BTManagerRef &manager, std::vector< DBTEndpointRef > endpts)
 
static void myChangedAdapterSetFunc (const bool added, BTAdapterRef &adapter)
 
static void startDiscovery (const BTAdapterRef &adapter, const bool current_exp_discovering_state)
 
static void stopDiscovery (const BTAdapterRef &adapter, const bool current_exp_discovering_state)
 

Static Public Attributes

static std::vector< DBTEndpointRefcas_endpts
 
static std::mutex mtx_cas_endpts
 

Detailed Description

Definition at line 43 of file dbt_endpoint.hpp.

Constructor & Destructor Documentation

◆ ~DBTEndpoint()

virtual DBTEndpoint::~DBTEndpoint ( )
virtualdefault

Member Function Documentation

◆ getName()

virtual std::string DBTEndpoint::getName ( )
pure virtual

Return name of this endpoint, which becomes the adapter's name.

Implemented in DBTClient01, and DBTServer01.

◆ setAdapter()

virtual void DBTEndpoint::setAdapter ( BTAdapterRef  a)
pure virtual

Set the server adapter for this endpoint.

This is done in ChangedAdapterSetListener#adapterAdded(BTAdapter) if initAdapter(BTAdapter) returned true.

Parameters
athe associate adapter for this endpoint.

Implemented in DBTClient01, and DBTServer01.

◆ getAdapter()

virtual BTAdapterRef DBTEndpoint::getAdapter ( )
pure virtual

Return the adapter for this endpoint.

Implemented in DBTClient01, and DBTServer01.

◆ close()

virtual void DBTEndpoint::close ( const std::string &  msg)
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ setProtocolSessionsLeft()

virtual void DBTEndpoint::setProtocolSessionsLeft ( const int  v)
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ getProtocolSessionsLeft()

virtual int DBTEndpoint::getProtocolSessionsLeft ( )
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ getProtocolSessionsDoneTotal()

virtual int DBTEndpoint::getProtocolSessionsDoneTotal ( )
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ getProtocolSessionsDoneSuccess()

virtual int DBTEndpoint::getProtocolSessionsDoneSuccess ( )
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ getDisconnectCount()

virtual int DBTEndpoint::getDisconnectCount ( )
pure virtual

Implemented in DBTClient01, and DBTServer01.

◆ initAdapter()

virtual bool DBTEndpoint::initAdapter ( BTAdapterRef  adapter)
pure virtual

Initialize the given adapter for this endpoint.

The matching and successfully initialized adapter will become this endpoint's associated adapter via setAdapter(BTAdapter), as performed in in ChangedAdapterSetListener#adapterAdded(BTAdapter).

Parameters
adapterthe potential associated adapter for this endpoint.
Returns
true if successful and associated

Implemented in DBTClient01, and DBTServer01.

◆ checkInitializedState()

static void DBTEndpoint::checkInitializedState ( const DBTEndpointRef endp)
inlinestatic

Definition at line 89 of file dbt_endpoint.hpp.

Here is the caller graph for this function:

◆ myChangedAdapterSetFunc()

static void DBTEndpoint::myChangedAdapterSetFunc ( const bool  added,
BTAdapterRef adapter 
)
inlinestatic

Definition at line 100 of file dbt_endpoint.hpp.

Here is the caller graph for this function:

◆ initChangedAdapterSetListener()

static ChangedAdapterSetCallback DBTEndpoint::initChangedAdapterSetListener ( const BTManagerRef manager,
std::vector< DBTEndpointRef endpts 
)
inlinestatic

Definition at line 124 of file dbt_endpoint.hpp.

Here is the caller graph for this function:

◆ startDiscovery()

static void DBTEndpoint::startDiscovery ( const BTAdapterRef adapter,
const bool  current_exp_discovering_state 
)
inlinestatic

Definition at line 135 of file dbt_endpoint.hpp.

Here is the caller graph for this function:

◆ stopDiscovery()

static void DBTEndpoint::stopDiscovery ( const BTAdapterRef adapter,
const bool  current_exp_discovering_state 
)
inlinestatic

Definition at line 148 of file dbt_endpoint.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ mtx_cas_endpts

std::mutex DBTEndpoint::mtx_cas_endpts
static

Definition at line 97 of file dbt_endpoint.hpp.

◆ cas_endpts

std::vector< DBTEndpointRef > DBTEndpoint::cas_endpts
static

Definition at line 98 of file dbt_endpoint.hpp.


The documentation for this class was generated from the following file: