aboutsummaryrefslogtreecommitdiffstats
path: root/java/org/direct_bt/BTAdapter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-11-09 10:07:23 +0100
committerSven Gothel <[email protected]>2021-11-09 10:07:23 +0100
commitaa76f1b1faa943f3f81b799da47ca38caedfc377 (patch)
treef98090b663b5e81fc66a2cd751aa69d562933938 /java/org/direct_bt/BTAdapter.java
parent9e003c83c282e7749b4fcafdca678dc755a307db (diff)
Slave Peripheral / Gatt Server: Map DBGattServer.hpp types DBGatt[Server|Service|Char|Desc] to Java ; BTAdapter.startAdvertising(..) Adds DBGattServer arg
- Implementation is not yet functional, i.e. types are not yet mapped to native instance. - DBGattChar and DBGattDesc value currently just a 'byte[]' and lacks capacity: - Its capacity defines the maximum writable variable length - and its size defines the maximum writable fixed length.
Diffstat (limited to 'java/org/direct_bt/BTAdapter.java')
-rw-r--r--java/org/direct_bt/BTAdapter.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/java/org/direct_bt/BTAdapter.java b/java/org/direct_bt/BTAdapter.java
index 3f1ef2ae..7edaf378 100644
--- a/java/org/direct_bt/BTAdapter.java
+++ b/java/org/direct_bt/BTAdapter.java
@@ -270,6 +270,8 @@ public interface BTAdapter extends BTObject
*
* If successful, method also changes [this adapter's role](@ref BTAdapterRoles) to ::BTRole::Slave.
*
+ * @param gattServerData_ the {@link DBGattServer} data to be advertised and offered via GattHandler as ::GATTRole::Server.
+ * Its handles will be setup via DBGattServer::setServicesHandles().
* @param adv_interval_min in units of 0.625ms, default value 0x0800 for 1.28s; Value range [0x0020 .. 0x4000] for [20ms .. 10.24s]
* @param adv_interval_max in units of 0.625ms, default value 0x0800 for 1.28s; Value range [0x0020 .. 0x4000] for [20ms .. 10.24s]
* @param adv_type see AD_PDU_Type, default 0x00, i.e. ::AD_PDU_Type::ADV_IND
@@ -283,12 +285,15 @@ public interface BTAdapter extends BTObject
* @see @ref BTAdapterRoles
* @since 2.4.0
*/
- HCIStatusCode startAdvertising(final short adv_interval_min, final short adv_interval_max,
+ HCIStatusCode startAdvertising(final DBGattServer gattServerData,
+ final short adv_interval_min, final short adv_interval_max,
final byte adv_type, final byte adv_chan_map, final byte filter_policy);
/**
* Starts advertising using all default arguments, see {@link #startAdvertising(short, short, byte, byte, byte)} for details.
*
+ * @param gattServerData_ the {@link DBGattServer} data to be advertised and offered via GattHandler as ::GATTRole::Server.
+ * Its handles will be setup via DBGattServer::setServicesHandles().
* @return HCIStatusCode::SUCCESS if successful, otherwise the HCIStatusCode error state
* @see #startAdvertising(short, short, byte, byte, byte)
* @see #stopAdvertising()
@@ -297,8 +302,8 @@ public interface BTAdapter extends BTObject
* @see @ref BTAdapterRoles
* @since 2.4.0
*/
- HCIStatusCode startAdvertising(); /* {
- return startAdvertising((short)0x0800, (short)0x0800, (byte)0, // AD_PDU_Type::ADV_IND,
+ HCIStatusCode startAdvertising(final DBGattServer gattServerData); /* {
+ return startAdvertising(gattServerData, (short)0x0800, (short)0x0800, (byte)0, // AD_PDU_Type::ADV_IND,
(byte)0x07, (byte)0x00);
} */