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

Commit 41c73ef7 authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Gerrit Code Review
Browse files

Merge "Floss: Add a stub for IBluetoothGatt::IsMsftSupported"

parents 2bae2831 f94cd35f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -861,6 +861,11 @@ impl BluetoothGattDBus {
impl IBluetoothGatt for BluetoothGattDBus {
    // Scanning

    #[dbus_method("IsMsftSupported")]
    fn is_msft_supported(&self) -> bool {
        dbus_generated!()
    }

    #[dbus_method("RegisterScannerCallback")]
    fn register_scanner_callback(&mut self, _callback: Box<dyn IScannerCallback + Send>) -> u32 {
        dbus_generated!()
+5 −0
Original line number Diff line number Diff line
@@ -438,6 +438,11 @@ struct IBluetoothGattDBus {}
impl IBluetoothGatt for IBluetoothGattDBus {
    // Scanning

    #[dbus_method("IsMsftSupported")]
    fn is_msft_supported(&self) -> bool {
        dbus_generated!()
    }

    #[dbus_method("RegisterScannerCallback")]
    fn register_scanner_callback(&mut self, callback: Box<dyn IScannerCallback + Send>) -> u32 {
        dbus_generated!()
+9 −0
Original line number Diff line number Diff line
@@ -182,6 +182,10 @@ impl ContextMap {
pub trait IBluetoothGatt {
    // Scanning

    /// Returns whether LE Scan can be performed by hardware offload defined by
    /// [MSFT HCI Extension](https://learn.microsoft.com/en-us/windows-hardware/drivers/bluetooth/microsoft-defined-bluetooth-hci-commands-and-events).
    fn is_msft_supported(&self) -> bool;

    /// Registers an LE scanner callback.
    ///
    /// Returns the callback id.
@@ -936,6 +940,11 @@ struct ScannerInfo {
}

impl IBluetoothGatt for BluetoothGatt {
    fn is_msft_supported(&self) -> bool {
        // TODO(b/244505567): Wire the real capability from lower layer.
        false
    }

    fn register_scanner_callback(&mut self, callback: Box<dyn IScannerCallback + Send>) -> u32 {
        self.scanner_callbacks.add_callback(callback)
    }