Skip to content

Commit

Permalink
feat: add connection_slots to AdapterDetails (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 21, 2022
1 parent 62d861d commit c0a7b52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bluetooth_adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"load_history_from_managed_objects",
"AdapterDetails",
"ADAPTER_ADDRESS",
"ADAPTER_CONNECTIONS_SLOTS",
"ADAPTER_SW_VERSION",
"ADAPTER_HW_VERSION",
"ADAPTER_PASSIVE_SCAN",
Expand All @@ -68,4 +69,5 @@
"MACOS_DEFAULT_BLUETOOTH_ADAPTER",
"UNIX_DEFAULT_BLUETOOTH_ADAPTER",
"DEFAULT_ADDRESS",
"DEFAULT_CONNECTION_SLOTS",
]
2 changes: 2 additions & 0 deletions src/bluetooth_adapters/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/bluetooth_adapters/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

0 comments on commit c0a7b52

Please sign in to comment.