[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bluetooth ab3a4c9cc5 18/32: move bluetooth--create-devi
From: |
Stefan Kangas |
Subject: |
[elpa] externals/bluetooth ab3a4c9cc5 18/32: move bluetooth--create-device to the other --device functions |
Date: |
Mon, 3 Jan 2022 15:11:08 -0500 (EST) |
branch: externals/bluetooth
commit ab3a4c9cc52d94282802fa0471bbf6e3840e4ab0
Author: Raffael Stocker <r.stocker@mnet-mail.de>
Commit: Raffael Stocker <r.stocker@mnet-mail.de>
move bluetooth--create-device to the other --device functions
---
bluetooth.el | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/bluetooth.el b/bluetooth.el
index 9cdde1ef0a..897c40d1d5 100644
--- a/bluetooth.el
+++ b/bluetooth.el
@@ -390,7 +390,18 @@ properties."
((null value) "no")
(t "yes"))))
-;; TODO extend to multiple adapters
+(defun bluetooth--create-device (adapter dev-id)
+ "Create a bluetooth device struct for DEV-ID on ADAPTER."
+ (let* ((path (mapconcat #'identity
+ (list bluetooth--root adapter
dev-id)
+ "/"))
+ (props (dbus-get-all-properties bluetooth-bluez-bus
+
bluetooth--service
+
path
+
(alist-get
+
:device bluetooth--interfaces))))
+ (make-bluetooth-device :id dev-id :properties props)))
+
(defun bluetooth--adapter-properties (adapter)
"Return the properties of bluetooth ADAPTER.
This function evaluates to an alist of attribute/value pairs."
@@ -407,18 +418,6 @@ This function evaluates to an alist of attribute/value
pairs."
NOTE: the strings MUST correspond to Bluez device properties
as they are used to gather the information from Bluez.")
-(defun bluetooth--create-device (adapter dev-id)
- "Create a bluetooth device struct for DEV-ID on ADAPTER."
- (let* ((path (mapconcat #'identity
- (list bluetooth--root adapter
dev-id)
- "/"))
- (props (dbus-get-all-properties bluetooth-bluez-bus
-
bluetooth--service
-
path
-
(alist-get
-
:device bluetooth--interfaces))))
- (make-bluetooth-device :id dev-id :properties props)))
-
(defun bluetooth--update-device-info ()
"Update the bluetooth devices list."
(mapc (lambda (adapter)
- [elpa] externals/bluetooth a411243fbe 17/32: add a function for bluetooth device info access, (continued)
- [elpa] externals/bluetooth a411243fbe 17/32: add a function for bluetooth device info access, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7a78351220 19/32: set tabulated-list-padding to 0, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1f048b5949 20/32: clean up and drop multiple adapter plans, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth fa3761da3c 21/32: add timer to periodically update the device table in discovery mode, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth c75d2e3495 22/32: handle removal of devices in list view, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth ddad595699 23/32: move command definitions to bottom of file, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1254ec44d2 24/32: add signal handlers for paired devices, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7a0ba3c7ea 29/32: update Readme.org, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 1fcdce66f8 31/32: require dash 2.18.1, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7ed3db7260 32/32: Release 0.3 and bump copyright year, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth ab3a4c9cc5 18/32: move bluetooth--create-device to the other --device functions,
Stefan Kangas <=
- [elpa] externals/bluetooth a20d488f9a 28/32: delete invalid todo, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth b6c501ae6e 04/32: add bluetooth--adapters function, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth cc8f69992d 06/32: adjust initial hash table sizes, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 0ba4d39085 13/32: correct indentation, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 7198f6b1a5 26/32: correct bluetooth--with-alias in case of unknown devices, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 301c37f388 27/32: list device only when properties are available, Stefan Kangas, 2022/01/03
- [elpa] externals/bluetooth 20bd089399 30/32: update UUIDs, Stefan Kangas, 2022/01/03