Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | List of all members
JNIDBGattServerListener Class Reference

DBGattServer.Listener and related DBGattServer methods. More...

Inheritance diagram for JNIDBGattServerListener:
Collaboration diagram for JNIDBGattServerListener:

Public Member Functions

 JNIDBGattServerListener (JNIEnv *env, jclass clazz, jobject obj)
 
 ~JNIDBGattServerListener () noexcept override=default
 
void clientCharConfigChanged (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d, const bool notificationEnabled, const bool indicationEnabled) override
 Notifies a change of the Client Characteristic Configuration Descriptor (CCCD) value. More...
 
void connected (const BTDeviceRef &device, const uint16_t initialMTU) override
 Notification that device got connected. More...
 
void disconnected (const BTDeviceRef &device) override
 Notification that device got disconnected. More...
 
void mtuChanged (const BTDeviceRef &device, const uint16_t mtu) override
 Notification that the MTU has changed. More...
 
bool readCharValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c) override
 Signals attempt to read a value. More...
 
bool readDescValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d) override
 Signals attempt to read a value. More...
 
bool writeCharValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const jau::TROOctets &value, const uint16_t value_offset) override
 Signals attempt to write a single or bulk (prepare) value. More...
 
void writeCharValueDone (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c) override
 Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests. More...
 
bool writeDescValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d, const jau::TROOctets &value, const uint16_t value_offset) override
 Signals attempt to write a single or bulk (prepare) value. More...
 
void writeDescValueDone (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d) override
 Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests. More...
 
- Public Member Functions inherited from direct_bt::DBGattServer::Listener
virtual ~Listener ()=default
 
virtual void clientCharConfigChanged (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d, const bool notificationEnabled, const bool indicationEnabled)=0
 Notifies a change of the Client Characteristic Configuration Descriptor (CCCD) value. More...
 
virtual void connected (const BTDeviceRef &device, const uint16_t initialMTU)=0
 Notification that device got connected. More...
 
virtual void disconnected (const BTDeviceRef &device)=0
 Notification that device got disconnected. More...
 
virtual void mtuChanged (const BTDeviceRef &device, const uint16_t mtu)=0
 Notification that the MTU has changed. More...
 
bool operator!= (const Listener &rhs) const
 
virtual bool operator== (const Listener &rhs) const
 Default comparison operator, merely testing for same memory reference. More...
 
virtual bool readCharValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c)=0
 Signals attempt to read a value. More...
 
virtual bool readDescValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d)=0
 Signals attempt to read a value. More...
 
virtual bool writeCharValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const jau::TROOctets &value, const uint16_t value_offset)=0
 Signals attempt to write a single or bulk (prepare) value. More...
 
virtual void writeCharValueDone (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c)=0
 Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests. More...
 
virtual bool writeDescValue (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d, const jau::TROOctets &value, const uint16_t value_offset)=0
 Signals attempt to write a single or bulk (prepare) value. More...
 
virtual void writeDescValueDone (const BTDeviceRef &device, const DBGattServiceRef &s, const DBGattCharRef &c, const DBGattDescRef &d)=0
 Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests. More...
 

Detailed Description

DBGattServer.Listener and related DBGattServer methods.

Definition at line 608 of file DBGattServer.cxx.

Constructor & Destructor Documentation

◆ JNIDBGattServerListener()

JNIDBGattServerListener::JNIDBGattServerListener ( JNIEnv *  env,
jclass  clazz,
jobject  obj 
)
inline

Definition at line 623 of file DBGattServer.cxx.

◆ ~JNIDBGattServerListener()

JNIDBGattServerListener::~JNIDBGattServerListener ( )
overridedefaultnoexcept

Member Function Documentation

◆ connected()

void JNIDBGattServerListener::connected ( const BTDeviceRef device,
const uint16_t  initialMTU 
)
inlineoverridevirtual

Notification that device got connected.

Convenient user entry, allowing to setup resources.

Parameters
devicethe connected device
initialMTUinitial used minimum MTU until negotiated.

Implements direct_bt::DBGattServer::Listener.

Definition at line 640 of file DBGattServer.cxx.

◆ disconnected()

void JNIDBGattServerListener::disconnected ( const BTDeviceRef device)
inlineoverridevirtual

Notification that device got disconnected.

Convenient user entry, allowing to clean up resources.

Parameters
devicethe disconnected device.

Implements direct_bt::DBGattServer::Listener.

Definition at line 648 of file DBGattServer.cxx.

◆ mtuChanged()

void JNIDBGattServerListener::mtuChanged ( const BTDeviceRef device,
const uint16_t  mtu 
)
inlineoverridevirtual

Notification that the MTU has changed.

Parameters
devicethe device for which the MTU has changed
mtuthe new negotiated MTU

Implements direct_bt::DBGattServer::Listener.

Definition at line 656 of file DBGattServer.cxx.

◆ readCharValue()

bool JNIDBGattServerListener::readCharValue ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c 
)
inlineoverridevirtual

Signals attempt to read a value.

Callee shall accept the read request by returning true, otherwise false.

Parameters
device
s
c
Returns
true if master read has been accepted by GATT-Server listener, otherwise false. Only if all listener return true, the read action will be allowed.

Implements direct_bt::DBGattServer::Listener.

Definition at line 664 of file DBGattServer.cxx.

◆ readDescValue()

bool JNIDBGattServerListener::readDescValue ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c,
const DBGattDescRef d 
)
inlineoverridevirtual

Signals attempt to read a value.

Callee shall accept the read request by returning true, otherwise false.

Parameters
device
s
c
d
Returns
true if master read has been accepted by GATT-Server listener, otherwise false. Only if all listener return true, the read action will be allowed.

Implements direct_bt::DBGattServer::Listener.

Definition at line 675 of file DBGattServer.cxx.

◆ writeCharValue()

bool JNIDBGattServerListener::writeCharValue ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c,
const jau::TROOctets value,
const uint16_t  value_offset 
)
inlineoverridevirtual

Signals attempt to write a single or bulk (prepare) value.

Callee shall accept the write request by returning true, otherwise false.

Parameters
device
s
c
value
value_offset
Returns
true if master write has been accepted by GATT-Server listener, otherwise false. Only if all listener return true, the write action will be allowed.
See also
writeCharValueDone()

Implements direct_bt::DBGattServer::Listener.

Definition at line 687 of file DBGattServer.cxx.

◆ writeCharValueDone()

void JNIDBGattServerListener::writeCharValueDone ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c 
)
inlineoverridevirtual

Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests.

Parameters
device
s
c
See also
writeCharValue()

Implements direct_bt::DBGattServer::Listener.

Definition at line 703 of file DBGattServer.cxx.

◆ writeDescValue()

bool JNIDBGattServerListener::writeDescValue ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c,
const DBGattDescRef d,
const jau::TROOctets value,
const uint16_t  value_offset 
)
inlineoverridevirtual

Signals attempt to write a single or bulk (prepare) value.

Callee shall accept the write request by returning true, otherwise false.

Parameters
device
s
c
d
value
value_offset
Returns
true if master write has been accepted by GATT-Server listener, otherwise false. Only if all listener return true, the write action will be allowed.
See also
writeDescValueDone()

Implements direct_bt::DBGattServer::Listener.

Definition at line 713 of file DBGattServer.cxx.

◆ writeDescValueDone()

void JNIDBGattServerListener::writeDescValueDone ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c,
const DBGattDescRef d 
)
inlineoverridevirtual

Notifies completion of single or bulk writeCharValue() after having accepted and performed all write requests.

Parameters
device
s
c
d
See also
writeDescValue()

Implements direct_bt::DBGattServer::Listener.

Definition at line 730 of file DBGattServer.cxx.

◆ clientCharConfigChanged()

void JNIDBGattServerListener::clientCharConfigChanged ( const BTDeviceRef device,
const DBGattServiceRef s,
const DBGattCharRef c,
const DBGattDescRef d,
const bool  notificationEnabled,
const bool  indicationEnabled 
)
inlineoverridevirtual

Notifies a change of the Client Characteristic Configuration Descriptor (CCCD) value.

Parameters
device
s
c
d
notificationEnabled
indicationEnabled

Implements direct_bt::DBGattServer::Listener.

Definition at line 741 of file DBGattServer.cxx.


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