From c0a7b52835cf8c7a68c54e483fa86436ea0c3342 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 21 Dec 2022 12:47:10 -1000 Subject: [PATCH] feat: add connection_slots to AdapterDetails (#35) --- src/bluetooth_adapters/__init__.py | 2 ++ src/bluetooth_adapters/const.py | 2 ++ src/bluetooth_adapters/models.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/bluetooth_adapters/__init__.py b/src/bluetooth_adapters/__init__.py index afb6d59..fdd5cd3 100644 --- a/src/bluetooth_adapters/__init__.py +++ b/src/bluetooth_adapters/__init__.py @@ -57,6 +57,7 @@ "load_history_from_managed_objects", "AdapterDetails", "ADAPTER_ADDRESS", + "ADAPTER_CONNECTIONS_SLOTS", "ADAPTER_SW_VERSION", "ADAPTER_HW_VERSION", "ADAPTER_PASSIVE_SCAN", @@ -68,4 +69,5 @@ "MACOS_DEFAULT_BLUETOOTH_ADAPTER", "UNIX_DEFAULT_BLUETOOTH_ADAPTER", "DEFAULT_ADDRESS", + "DEFAULT_CONNECTION_SLOTS", ] diff --git a/src/bluetooth_adapters/const.py b/src/bluetooth_adapters/const.py index af45d3d..4f88aed 100644 --- a/src/bluetooth_adapters/const.py +++ b/src/bluetooth_adapters/const.py @@ -8,3 +8,5 @@ # Some operating systems hide the adapter address for privacy reasons (ex MacOS) DEFAULT_ADDRESS: Final = "00:00:00:00:00:00" + +DEFAULT_CONNECTION_SLOTS: Final = 5 diff --git a/src/bluetooth_adapters/models.py b/src/bluetooth_adapters/models.py index 8775436..0990215 100644 --- a/src/bluetooth_adapters/models.py +++ b/src/bluetooth_adapters/models.py @@ -16,6 +16,7 @@ class AdapterDetails(TypedDict, total=False): vendor_id: str | None product_id: str | None passive_scan: bool + connections_slots: int | None ADAPTER_ADDRESS: Final = "address" @@ -26,3 +27,4 @@ class AdapterDetails(TypedDict, total=False): ADAPTER_PRODUCT: Final = "product" ADAPTER_VENDOR_ID: Final = "vendor_id" ADAPTER_PRODUCT_ID: Final = "product_id" +ADAPTER_CONNECTIONS_SLOTS: Final = "connections_slots"