Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
L2CAP server socket to listen for connecting remote devices. More...
#include <L2CAPComm.hpp>
Public Member Functions | |
L2CAPServer (const uint16_t adev_id, BDAddressAndType localAddressAndType, const L2CAP_PSM psm, const L2CAP_CID cid) noexcept | |
~L2CAPServer () noexcept override | |
Destructor closing the L2CAP channel, see close() . More... | |
std::unique_ptr< L2CAPClient > | accept () noexcept |
bool | close () noexcept override |
Closing the L2CAP socket, see specializations. More... | |
std::string | getStateString () const noexcept override |
bool | open () noexcept |
std::string | toString () const noexcept override |
Public Member Functions inherited from direct_bt::L2CAPComm | |
L2CAPComm (const L2CAPComm &)=delete | |
L2CAPComm (const uint16_t adev_id, BDAddressAndType localAddressAndType, const L2CAP_PSM psm, const L2CAP_CID cid) noexcept | |
virtual | ~L2CAPComm () noexcept=default |
Destructor specialization shall close the L2CAP socket, see close() . More... | |
virtual bool | close () noexcept=0 |
Closing the L2CAP socket, see specializations. More... | |
virtual std::string | getStateString () const noexcept=0 |
bool | interrupted () const noexcept |
Returns true if interrupted by internal or external cause, hence shall stop connecting and reading. More... | |
bool | is_open () const noexcept |
void | operator= (const L2CAPComm &)=delete |
void | set_interrupted_query (get_boolean_callback_t is_interrupted_cb) noexcept |
The external is interrupted callback is used until close(), thereafter it is removed. More... | |
int | socket () const noexcept |
Return this L2CAP socket descriptor. More... | |
virtual std::string | toString () const noexcept=0 |
Additional Inherited Members | |
Public Types inherited from direct_bt::L2CAPComm | |
typedef jau::function< bool(int)> | get_boolean_callback_t |
Utilized to query for external interruption, whether device is still connected etc. More... | |
Static Public Member Functions inherited from direct_bt::L2CAPComm | |
static std::string | getStateString (bool isOpen, bool hasIOError) noexcept |
static std::string | getStateString (bool isOpen, bool irqed_int, bool irqed_ext, bool hasIOError) noexcept |
static std::string | getStateString (bool isOpen, bool isInterrupted, bool hasIOError) noexcept |
Public Attributes inherited from direct_bt::L2CAPComm | |
const uint16_t | adev_id |
Corresponding BTAdapter device id. More... | |
const L2CAP_CID | cid |
Corresponding L2CAP_CID for the channel. More... | |
const BDAddressAndType | localAddressAndType |
Corresponding BTAdapter local BTAddressAndType. More... | |
const L2CAP_PSM | psm |
Corresponding L2CAP_PSM for the channel. More... | |
Protected Member Functions inherited from direct_bt::L2CAPComm | |
BTSecurityLevel | getBTSecurityLevelImpl (const BDAddressAndType &remoteAddressAndType) noexcept |
bool | interrupted_ext () const noexcept |
Returns true if interrupted by external cause. More... | |
bool | interrupted_int () const noexcept |
Returns true if interrupted by internal cause. More... | |
bool | setBTSecurityLevelImpl (const BTSecurityLevel sec_level, const BDAddressAndType &remoteAddressAndType) noexcept |
Static Protected Member Functions inherited from direct_bt::L2CAPComm | |
static int | l2cap_close_dev (int dd) noexcept |
static int | l2cap_open_dev (const BDAddressAndType &adapterAddressAndType, const L2CAP_PSM psm, const L2CAP_CID cid) noexcept |
Protected Attributes inherited from direct_bt::L2CAPComm | |
const L2CAPEnv & | env |
jau::sc_atomic_bool | interrupted_intern |
get_boolean_callback_t | is_interrupted_extern |
jau::sc_atomic_bool | is_open_ |
std::recursive_mutex | mtx_open |
jau::relaxed_atomic_int | socket_ |
L2CAP server socket to listen for connecting remote devices.
Definition at line 317 of file L2CAPComm.hpp.
|
noexcept |
Definition at line 726 of file L2CAPComm.cpp.
|
inlineoverridenoexcept |
Destructor closing the L2CAP channel, see close()
.
Definition at line 327 of file L2CAPComm.hpp.
|
noexcept |
Definition at line 730 of file L2CAPComm.cpp.
|
inlineoverridevirtualnoexcept |
Closing the L2CAP socket, see specializations.
Implements direct_bt::L2CAPComm.
Definition at line 333 of file L2CAPComm.hpp.
|
noexcept |
|
inlineoverridevirtualnoexcept |
Implements direct_bt::L2CAPComm.
Definition at line 337 of file L2CAPComm.hpp.
|
overridevirtualnoexcept |
Implements direct_bt::L2CAPComm.
Definition at line 889 of file L2CAPComm.cpp.