diff options
author | Sven Gothel <[email protected]> | 2021-09-15 16:17:31 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-09-15 16:17:31 +0200 |
commit | a6480299996388b9013140254d5a336917b3e373 (patch) | |
tree | 3d3a17821a0b12482e848be11258962f3651de7c /java/jau | |
parent | 6a2d7770ebb3a20366239d5c1127a90c5dde71f7 (diff) |
Introduce BTRole: Bluetooth device roles from the perspective of the link layer (connection initiator): Initially for BTAdapter
Diffstat (limited to 'java/jau')
-rw-r--r-- | java/jau/direct_bt/DBTAdapter.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/java/jau/direct_bt/DBTAdapter.java b/java/jau/direct_bt/DBTAdapter.java index 440b4f8e..edf97e24 100644 --- a/java/jau/direct_bt/DBTAdapter.java +++ b/java/jau/direct_bt/DBTAdapter.java @@ -46,6 +46,7 @@ import org.direct_bt.BTGattService; import org.direct_bt.BTManager; import org.direct_bt.BTMode; import org.direct_bt.BTObject; +import org.direct_bt.BTRole; import org.direct_bt.BTType; import org.direct_bt.BTUtils; import org.direct_bt.EIRDataTypeSet; @@ -104,6 +105,18 @@ public class DBTAdapter extends DBTObject implements BTAdapter public final BTManager getManager() { return DBTManager.getManager(); } @Override + public final BTRole getRole() { + return BTRole.get(getRoleImpl()); + } + private native byte getRoleImpl(); + + @Override + public final BTMode getBTMode() { + return BTMode.get(getBTModeImpl()); + } + private native byte getBTModeImpl(); + + @Override public void close() { final DBTManager mngr = (DBTManager)DBTManager.getManager(); if( !isValid() ) { |