Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Rename GattConnection interface to something else #29

Open
LouisCAD opened this issue Nov 16, 2018 · 5 comments
Open

Proposal: Rename GattConnection interface to something else #29

LouisCAD opened this issue Nov 16, 2018 · 5 comments

Comments

@LouisCAD
Copy link
Collaborator

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.

@bj0
Copy link

bj0 commented Dec 6, 2018

Seems odd to put suspend on the front of the name, I would think async or asynchronous would be more descriptive/accurate. Maybe Allochronic...

BleGatt is probably best but least unique. Maybe AndroidBleGatt Library. That gets close to Able though, which is used by (https://github.com/JuulLabs-OSS/able).

Or maybe just some sort of pun involving Cats?

Or just a non-descriptive name? Bastet?

@es0329
Copy link

es0329 commented Dec 18, 2018

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

@JoeBakalor
Copy link

JoeBakalor commented Dec 18, 2018 via email

@WebTiger89
Copy link

BleGatt sounds good

@odahcam
Copy link

odahcam commented Jan 17, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants