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

Update reference to BlueZ or_pattern documentation #1480

Merged
merged 2 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bleak/backends/bluezdbus/advertisement_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
---------------------

This module contains types associated with the BlueZ D-Bus `advertisement
monitor api <https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt>`.
monitor api <https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst>`.
"""

import logging
Expand All @@ -22,7 +22,7 @@ class OrPattern(NamedTuple):
"""
BlueZ advertisement monitor or-pattern.

https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt
https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst#arrayuint8-uint8-arraybyte-patterns-read-only-optional
"""

start_position: int
Expand Down
13 changes: 8 additions & 5 deletions bleak/backends/bluezdbus/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@


# D-Bus properties for interfaces
# https://github.com/bluez/bluez/blob/master/doc/adapter-api.txt
# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst


class Adapter1(TypedDict):
Expand All @@ -43,7 +43,7 @@ class Adapter1(TypedDict):
ExperimentalFeatures: List[str]


# https://github.com/bluez/bluez/blob/master/doc/advertisement-monitor-api.txt
# https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitor.rst


class AdvertisementMonitor1(TypedDict):
Expand All @@ -56,20 +56,23 @@ class AdvertisementMonitor1(TypedDict):
Patterns: List[Tuple[int, int, bytes]]


# https://github.com/bluez/bluez/blob/master/doc/org.bluez.AdvertisementMonitorManager.rst


class AdvertisementMonitorManager1(TypedDict):
SupportedMonitorTypes: List[str]
SupportedFeatures: List[str]


# https://github.com/bluez/bluez/blob/master/doc/battery-api.txt
# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Battery.rst


class Battery1(TypedDict):
SupportedMonitorTypes: List[str]
SupportedFeatures: List[str]


# https://github.com/bluez/bluez/blob/master/doc/device-api.txt
# https://github.com/bluez/bluez/blob/master/doc/org.bluez.Device.rst


class Device1(TypedDict):
Expand Down Expand Up @@ -99,7 +102,7 @@ class Device1(TypedDict):
AdvertisingData: Dict[int, bytes]


# https://github.com/bluez/bluez/blob/master/doc/gatt-api.txt
# https://github.com/bluez/bluez/blob/master/doc/org.bluez.GattService.rst


class GattService1(TypedDict):
Expand Down
6 changes: 3 additions & 3 deletions bleak/backends/bluezdbus/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class BlueZDiscoveryFilters(TypedDict, total=False):
Dictionary of arguments for the ``org.bluez.Adapter1.SetDiscoveryFilter``
D-Bus method.

https://github.com/bluez/bluez/blob/master/doc/adapter-api.txt
https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter
"""

UUIDs: List[str]
Expand Down Expand Up @@ -93,7 +93,7 @@ class BleakScannerBlueZDBus(BaseBleakScanner):

For possible values for `filters`, see the parameters to the
``SetDiscoveryFilter`` method in the `BlueZ docs
<https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt?h=5.48&id=0d1e3b9c5754022c779da129025d493a198d49cf>`_
<https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter>`_

Args:
detection_callback:
Expand Down Expand Up @@ -201,7 +201,7 @@ def set_scanning_filter(self, **kwargs) -> None:

For possible values for `filters`, see the parameters to the
``SetDiscoveryFilter`` method in the `BlueZ docs
<https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/doc/adapter-api.txt?h=5.48&id=0d1e3b9c5754022c779da129025d493a198d49cf>`_
<https://github.com/bluez/bluez/blob/master/doc/org.bluez.Adapter.rst#void-setdiscoveryfilterdict-filter>`_

See variant types here: <https://python-dbus-next.readthedocs.io/en/latest/type-system/>

Expand Down
Loading