[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth eebb593 32/33: refactor variable names of has
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bluetooth eebb593 32/33: refactor variable names of hash tables (were: -alist) |
Date: |
Sat, 19 Sep 2020 08:43:26 -0400 (EDT) |
branch: externals/bluetooth
commit eebb593398fcc1e07eafdc72c1330a91fd8a3cab
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>
refactor variable names of hash tables (were: -alist)
* bluetooth.el (bluetooth--service-class-uuid-alist): new names end in
-uuids
(bluetooth--gatt-service-uuid-alist):
(bluetooth--sdo-uuid-alist):
(bluetooth--member-uuid-alist):
(bluetooth--uuid-alists):
---
bluetooth.el | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/bluetooth.el b/bluetooth.el
index de68b6b..af7ddfe 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -938,7 +938,10 @@ scanning the bus, displaying device info etc."
(#xf . "Personal mobility device"))))
"Bluetooth health minor classes.")
-(defconst bluetooth--service-class-uuid-alist
+(define-obsolete-variable-alias 'bluetooth--service-class-uuid-alist
+ 'bluetooth--service-class-uuids "0.2")
+
+(defconst bluetooth--service-class-uuids
#s(hash-table
size 50 data
(#x1000
@@ -1034,7 +1037,10 @@ scanning the bus, displaying device info etc."
#x1402 ("HDP Sink" "Health Device Profile (HDP)")))
"Bluetooth service class UUIDs.")
-(defconst bluetooth--gatt-service-uuid-alist
+(define-obsolete-variable-alias 'bluetooth--gatt-service-uuid-alist
+ 'bluetooth--gatt-service-uuids "0.2")
+
+(defconst bluetooth--gatt-service-uuids
#s(hash-table
size 20 data
(#x1800
@@ -1110,7 +1116,10 @@ scanning the bus, displaying device info etc."
#x181D ("Weight Scale" "org.bluetooth.service.weight_scale" "GSS")))
"Bluetooth GATT service UUIDs.")
-(defconst bluetooth--sdo-uuid-alist
+(define-obsolete-variable-alias 'bluetooth--sdo-uuid-alist
+ 'bluetooth--sdo-uuids "0.2")
+
+(defconst bluetooth--sdo-uuids
#s(hash-table
size 5 data
(#xFFF9
@@ -1129,7 +1138,10 @@ scanning the bus, displaying device info etc."
;;;; Bluetooth member UUIDs
;; Last updated: 19. Sep 2020
-(defconst bluetooth--member-uuid-alist
+(define-obsolete-variable-alias 'bluetooth--member-uuid-alist
+ 'bluetooth--member-uuids "0.2")
+
+(defconst bluetooth--member-uuids
#s(hash-table
size 100 data
(#xFEFF
@@ -1584,12 +1596,14 @@ scanning the bus, displaying device info etc."
;;;; service and class parsing code
-(defconst bluetooth--uuid-alists
- `((#xfff0 . ,bluetooth--sdo-uuid-alist)
- (#xfd00 . ,bluetooth--member-uuid-alist)
- (#x1800 . ,bluetooth--gatt-service-uuid-alist)
- (#x0 . ,bluetooth--service-class-uuid-alist))
- "Bluetooth UUID alists sorted by beginning of range.")
+(define-obsolete-variable-alias 'bluetooth--uuid-alists 'bluetooth--uuids
"0.2")
+
+(defconst bluetooth--uuids
+ `((#xfff0 . ,bluetooth--sdo-uuids)
+ (#xfd00 . ,bluetooth--member-uuids)
+ (#x1800 . ,bluetooth--gatt-service-uuids)
+ (#x0 . ,bluetooth--service-class-uuids))
+ "Bluetooth UUID tables sorted by beginning of range.")
(defun bluetooth--parse-service-class-uuid (uuid)
"Parse UUID and return short and long service class names."
@@ -1599,7 +1613,7 @@ scanning the bus, displaying device info etc."
(let ((service-id (string-to-number (match-string 1 uuid) 16)))
(or (gethash service-id
(cdr (-find (lambda (x) (>= service-id
(car x)))
-
bluetooth--uuid-alists)))
+
bluetooth--uuids)))
(list (format "#x%08x" service-id) "unknown"))))))
(defun bluetooth--parse-class (class)
- [elpa] externals/bluetooth 518ebdf 29/33: update company ids (bluetooth--manufacturer-ids), (continued)
- [elpa] externals/bluetooth 518ebdf 29/33: update company ids (bluetooth--manufacturer-ids), Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 2746c62 23/33: change connect and disconnect functions to handle single profiles, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 0ca89cf 24/33: clean up the connect and disconnect functions, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 7bb793f 26/33: remove unneeded hydra reference from Makefile, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 950cc77 27/33: add more menu entries, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth b5fc5c2 28/33: correct docstring in bluetooth-disconnect, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 28d16f6 33/33: set version number to 0.2, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth dc4b63b 30/33: correct docstrings, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 6599093 31/33: update list of member UUIDs (bluetooth--member-uuid-alist)., Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth 2ae073b 25/33: update readme with single profile connect information, Stefan Monnier, 2020/09/19
- [elpa] externals/bluetooth eebb593 32/33: refactor variable names of hash tables (were: -alist),
Stefan Monnier <=