From 62ecc0a7619504678c7036e14919ee8c732f50a5 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 24 Jan 2022 19:04:05 +0100 Subject: Enhance API doc: DBGattServer::Listener (C++) and DBGattServer.Listener (java) --- api/direct_bt/DBGattServer.hpp | 13 +++++++++++++ java/org/direct_bt/DBGattServer.java | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/api/direct_bt/DBGattServer.hpp b/api/direct_bt/DBGattServer.hpp index 144592b7..e646ee76 100644 --- a/api/direct_bt/DBGattServer.hpp +++ b/api/direct_bt/DBGattServer.hpp @@ -641,6 +641,9 @@ namespace direct_bt { virtual void mtuChanged(BTDeviceRef device, const uint16_t mtu) = 0; /** + * Signals attempt to read a value. + * + * Callee shall accept the read request by returning true, otherwise false. * * @param device * @param s @@ -650,6 +653,9 @@ namespace direct_bt { virtual bool readCharValue(BTDeviceRef device, DBGattServiceRef s, DBGattCharRef c) = 0; /** + * Signals attempt to read a value. + * + * Callee shall accept the read request by returning true, otherwise false. * * @param device * @param s @@ -660,6 +666,9 @@ namespace direct_bt { virtual bool readDescValue(BTDeviceRef device, DBGattServiceRef s, DBGattCharRef c, DBGattDescRef d) = 0; /** + * Signals attempt to write a single or bulk (prepare) value. + * + * Callee shall accept the write request by returning true, otherwise false. * * @param device * @param s @@ -672,6 +681,9 @@ namespace direct_bt { const jau::TROOctets & value, const uint16_t value_offset) = 0; /** + * Signals attempt to write a single or bulk (prepare) value. + * + * Callee shall accept the write request by returning true, otherwise false. * * @param device * @param s @@ -685,6 +697,7 @@ namespace direct_bt { const jau::TROOctets & value, const uint16_t value_offset) = 0; /** + * Notifies a change of the Client Characteristic Configuration Descriptor (CCCD) value. * * @param device * @param s diff --git a/java/org/direct_bt/DBGattServer.java b/java/org/direct_bt/DBGattServer.java index 57393b82..d625e7eb 100644 --- a/java/org/direct_bt/DBGattServer.java +++ b/java/org/direct_bt/DBGattServer.java @@ -107,6 +107,9 @@ public final class DBGattServer implements AutoCloseable public abstract void mtuChanged(final BTDevice device, final int mtu); /** + * Signals attempt to read a value. + * + * Callee shall accept the read request by returning true, otherwise false. * * @param device * @param s @@ -116,6 +119,9 @@ public final class DBGattServer implements AutoCloseable public abstract boolean readCharValue(final BTDevice device, final DBGattService s, final DBGattChar c); /** + * Signals attempt to read a value. + * + * Callee shall accept the read request by returning true, otherwise false. * * @param device * @param s @@ -126,6 +132,9 @@ public final class DBGattServer implements AutoCloseable public abstract boolean readDescValue(final BTDevice device, final DBGattService s, final DBGattChar c, final DBGattDesc d); /** + * Signals attempt to write a single or bulk (prepare) value. + * + * Callee shall accept the write request by returning true, otherwise false. * * @param device * @param s @@ -137,6 +146,9 @@ public final class DBGattServer implements AutoCloseable public abstract boolean writeCharValue(final BTDevice device, final DBGattService s, final DBGattChar c, final byte[] value, final int value_offset); /** + * Signals attempt to write a single or bulk (prepare) value. + * + * Callee shall accept the write request by returning true, otherwise false. * * @param device * @param s @@ -150,6 +162,7 @@ public final class DBGattServer implements AutoCloseable final byte[] value, final int value_offset); /** + * Notifies a change of the Client Characteristic Configuration Descriptor (CCCD) value. * * @param device * @param s -- cgit v1.2.3