Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 965f5e46 authored by John Lai's avatar John Lai Committed by Automerger Merge Worker
Browse files

Merge changes If1c9f6f2,I3ec69c86,Id5107d96,Icc5d86fc,Ie9a271f0, ... into main am: a725833c

parents f6b20533 a725833c
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -830,6 +830,12 @@ class FlossAdapterClient(BluetoothCallbacks, BluetoothConnectionCallbacks):
        device = self._make_dbus_device(address, self.known_devices.get(address, {}).get('name', 'Test device'))
        return bool(self.proxy().DisconnectAllEnabledProfiles(device))

    @utils.glib_call(None)
    def get_connection_state(self, address):
        """Gets connection state."""
        device = self._make_dbus_device(address, self.known_devices.get(address, {}).get('name', 'Test device'))
        return self.proxy().GetConnectionState(device)

    def wait_for_device_disconnected(self, address):
        """Waits for the device become disconnected."""

+24 −9
Original line number Diff line number Diff line
@@ -19,8 +19,9 @@ import enum
class BtTransport(enum.IntEnum):
    """Bluetooth transport type."""
    AUTO = 0
    BR_EDR = 1
    BREDR = 1
    LE = 2
    DUAL = 3


class GattWriteRequestStatus(enum.IntEnum):
@@ -142,14 +143,6 @@ class BondState(enum.IntEnum):
    BONDED = 2


class Transport(enum.IntEnum):
    """Bluetooth transport type."""
    AUTO = 0
    BREDR = 1
    LE = 2
    DUAL = 3


class PairingVariant(enum.IntEnum):
    """Bluetooth pairing variant type."""
    # SSP variants.
@@ -178,6 +171,14 @@ class OwnAddressType(enum.IntEnum):
    RANDOM = 1


class BtConnectionState(enum.IntEnum):
    NOT_CONNECTED = 0
    CONNECTED_ONLY = 1
    ENCRYPTED_BR_EDR = 3
    ENCRYPTED_LE = 5
    ENCRYPTED_BOTH = 7


class CompanyIdentifiers(enum.IntEnum):
    """Bluetooth SIG Company ID values.

@@ -212,3 +213,17 @@ class AdvertisingDataType(enum.IntEnum):
    URI = 0x24
    LE_SUPPORTED_FEATURES = 0x27
    MANUFACTURER_SPECIFIC_DATA = 0xFF


class BtDiscMode(enum.IntEnum):
    """Bluetooth discoverable mode."""
    NON_DISCOVERABLE = 0
    LIMITED_DISCOVERABLE = 1
    GENERAL_DISCOVERABLE = 2


class BthhReportType(enum.IntEnum):
    """Bluetooth HID report type."""
    INPUT_REPORT = 1
    OUTPUT_REPORT = 2
    FEATURE_REPORT = 3
Loading