question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Rename GattConnection interface to something else

See original GitHub issue

GattConnection is not the ideal name for 3 reasons:

  • Bluetooth or Ble is missing from its name, while it’s exclusively for Bluetooth General ATTribute.
  • There’s “Connection” in the name, but when an instance is originally created, the connection is not established yet.
  • There’s “Connection” in the name, but there’s a disconnect() function… should Connection be magically dropped from the name of the class when this function is called? Of course, this is impossible, but shows how the name is not an ideal fit.

Consequently, I want this class to be renamed when the first Kotlin 1.3 compatible version is released, with a deprecated typealias on initial pre-release (alpha, beta or rc) for source compatibility.

Here are a few name ideas:

  1. BleGatt
  2. SuspendBluetoothGatt
  3. SuspendBleGatt
  4. BluetoothGatt (with named import to reference Android’s as AndroidBluetoothGatt or alike)
  5. BluetoothGattIsFun (wait… maybe not actual fun yet 🤔)
  6. FunBluetoothGatt (this could open the discussion of a library renaming)

Please, add a comment to say what you think about each proposition (I may append more name ideas, but I will keep the numbers stable), and if you have other name ideas, please write them there too.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
JoeBakalorcommented, Dec 18, 2018

Short-link was in regards to Bluetooth classic though not Bluetooth Low Energy

Sent from my iPhone

On Dec 17, 2018, at 8:50 PM, Eric notifications@github.com wrote:

Hi, I’m passing through 😃 Given these options I agree with @bj0’s favor/caution with regard to BleGatt. I also see on Wikipedia that Bluetooth was first called “short-link” radio technology.

How does interface ShortLink sound to you?

internal class ShortLinkImpl( private val bluetoothDevice: BluetoothDevice, private val connectionSettings: ShortLink.ConnectionSettings ) : ShortLink, CoroutineScope — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

0reactions
odahcamcommented, Jan 17, 2020

You could create a GattConnectionBuilder that returns the GattConnection, it would give time for ya to think in a library rename.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rename Gatt Interfaces · Issue #35 · uber/RxCentralBle - GitHub
Although usage of "Gatt" in interface naming is accurate, we have discovered usage of the term "Peripheral" lends greater clarity to the ...
Read more >
Introducing the Adafruit Bluefruit LE Friend
The BLEFriend is (of course) capable of much more than basic UART data exchanges! You can use it to create custom GATT services...
Read more >
Renaming Interfaces - Network Performance Monitor (NPM)
I need to remane several hundred interfaces in our environment. Is there a way that I can get a list of all interfaces...
Read more >
5. User Guides — DA1469x Software Platform Reference
The BLE API provides an easy way to configure the BLE device, start air operations and set up the attribute database of a...
Read more >
Wireless Connectivity Knowledge Base - NXP Community
So, there are two roles defined at the ATT layer: Client devices access remote resources over a BLE link using the GATT protocol....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found