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

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

Merge "Floss: Clean up dbus projection code"

parents 56b88ee3 3991a7e3
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
use dbus::arg::RefArg;
use dbus::strings::Path;
use dbus_macros::{dbus_method, dbus_propmap, dbus_proxy_obj, generate_dbus_exporter};
use dbus_projection::DisconnectWatcher;
use dbus_projection::{dbus_generated, DisconnectWatcher};

use manager_service::iface_bluetooth_manager::{
    AdapterWithEnabled, IBluetoothManager, IBluetoothManagerCallback,
@@ -22,30 +22,38 @@ struct BluetoothManagerDBus {}
#[generate_dbus_exporter(export_bluetooth_manager_dbus_obj, "org.chromium.bluetooth.Manager")]
impl IBluetoothManager for BluetoothManagerDBus {
    #[dbus_method("Start")]
    fn start(&mut self, _hci_interface: i32) {}
    fn start(&mut self, hci_interface: i32) {
        dbus_generated!()
    }

    #[dbus_method("Stop")]
    fn stop(&mut self, _hci_interface: i32) {}
    fn stop(&mut self, hci_interface: i32) {
        dbus_generated!()
    }

    #[dbus_method("GetAdapterEnabled")]
    fn get_adapter_enabled(&mut self, _hci_interface: i32) -> bool {
        false
    fn get_adapter_enabled(&mut self, hci_interface: i32) -> bool {
        dbus_generated!()
    }

    #[dbus_method("RegisterCallback")]
    fn register_callback(&mut self, _callback: Box<dyn IBluetoothManagerCallback + Send>) {}
    fn register_callback(&mut self, callback: Box<dyn IBluetoothManagerCallback + Send>) {
        dbus_generated!()
    }

    #[dbus_method("GetFlossEnabled")]
    fn get_floss_enabled(&mut self) -> bool {
        false
        dbus_generated!()
    }

    #[dbus_method("SetFlossEnabled")]
    fn set_floss_enabled(&mut self, _enabled: bool) {}
    fn set_floss_enabled(&mut self, enabled: bool) {
        dbus_generated!()
    }

    #[dbus_method("GetAvailableAdapters")]
    fn get_available_adapters(&mut self) -> Vec<AdapterWithEnabled> {
        vec![]
        dbus_generated!()
    }
}

+14 −14
Original line number Diff line number Diff line
@@ -194,17 +194,17 @@ impl IBluetooth for IBluetoothDBus {
    }

    #[dbus_method("CreateBond")]
    fn create_bond(&self, _device: BluetoothDevice, _transport: BtTransport) -> bool {
    fn create_bond(&self, device: BluetoothDevice, transport: BtTransport) -> bool {
        dbus_generated!()
    }

    #[dbus_method("CancelBondProcess")]
    fn cancel_bond_process(&self, _device: BluetoothDevice) -> bool {
    fn cancel_bond_process(&self, device: BluetoothDevice) -> bool {
        dbus_generated!()
    }

    #[dbus_method("RemoveBond")]
    fn remove_bond(&self, _device: BluetoothDevice) -> bool {
    fn remove_bond(&self, device: BluetoothDevice) -> bool {
        dbus_generated!()
    }

@@ -214,22 +214,22 @@ impl IBluetooth for IBluetoothDBus {
    }

    #[dbus_method("GetBondState")]
    fn get_bond_state(&self, _device: BluetoothDevice) -> u32 {
    fn get_bond_state(&self, device: BluetoothDevice) -> u32 {
        dbus_generated!()
    }

    #[dbus_method("SetPin")]
    fn set_pin(&self, _device: BluetoothDevice, _accept: bool, _pin_code: Vec<u8>) -> bool {
    fn set_pin(&self, device: BluetoothDevice, accept: bool, pin_code: Vec<u8>) -> bool {
        dbus_generated!()
    }

    #[dbus_method("SetPasskey")]
    fn set_passkey(&self, _device: BluetoothDevice, _accept: bool, _passkey: Vec<u8>) -> bool {
    fn set_passkey(&self, device: BluetoothDevice, accept: bool, passkey: Vec<u8>) -> bool {
        dbus_generated!()
    }

    #[dbus_method("SetPairingConfirmation")]
    fn set_pairing_confirmation(&self, _device: BluetoothDevice, _accept: bool) -> bool {
    fn set_pairing_confirmation(&self, device: BluetoothDevice, accept: bool) -> bool {
        dbus_generated!()
    }

@@ -254,37 +254,37 @@ impl IBluetooth for IBluetoothDBus {
    }

    #[dbus_method("GetConnectionState")]
    fn get_connection_state(&self, _device: BluetoothDevice) -> u32 {
    fn get_connection_state(&self, device: BluetoothDevice) -> u32 {
        dbus_generated!()
    }

    #[dbus_method("GetProfileConnectionState")]
    fn get_profile_connection_state(&self, _profile: Profile) -> u32 {
    fn get_profile_connection_state(&self, profile: Profile) -> u32 {
        dbus_generated!()
    }

    #[dbus_method("GetRemoteUuids")]
    fn get_remote_uuids(&self, _device: BluetoothDevice) -> Vec<Uuid128Bit> {
    fn get_remote_uuids(&self, device: BluetoothDevice) -> Vec<Uuid128Bit> {
        dbus_generated!()
    }

    #[dbus_method("FetchRemoteUuids")]
    fn fetch_remote_uuids(&self, _device: BluetoothDevice) -> bool {
    fn fetch_remote_uuids(&self, device: BluetoothDevice) -> bool {
        dbus_generated!()
    }

    #[dbus_method("SdpSearch")]
    fn sdp_search(&self, _device: BluetoothDevice, _uuid: Uuid128Bit) -> bool {
    fn sdp_search(&self, device: BluetoothDevice, uuid: Uuid128Bit) -> bool {
        dbus_generated!()
    }

    #[dbus_method("ConnectAllEnabledProfiles")]
    fn connect_all_enabled_profiles(&self, _device: BluetoothDevice) -> bool {
    fn connect_all_enabled_profiles(&self, device: BluetoothDevice) -> bool {
        dbus_generated!()
    }

    #[dbus_method("DisconnectAllEnabledProfiles")]
    fn disconnect_all_enabled_profiles(&self, _device: BluetoothDevice) -> bool {
    fn disconnect_all_enabled_profiles(&self, device: BluetoothDevice) -> bool {
        dbus_generated!()
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ struct BluetoothGattCallbackDBus {}
#[dbus_proxy_obj(BluetoothGattCallback, "org.chromium.bluetooth.BluetoothGattCallback")]
impl IBluetoothGattCallback for BluetoothGattCallbackDBus {
    #[dbus_method("OnClientRegistered")]
    fn on_client_registered(&self, _status: i32, _scanner_id: i32) {
    fn on_client_registered(&self, status: i32, scanner_id: i32) {
        dbus_generated!()
    }

@@ -142,7 +142,7 @@ struct ScannerCallbackDBus {}
#[dbus_proxy_obj(ScannerCallback, "org.chromium.bluetooth.ScannerCallback")]
impl IScannerCallback for ScannerCallbackDBus {
    #[dbus_method("OnScannerRegistered")]
    fn on_scanner_registered(&self, _status: i32, _scanner_id: i32) {
    fn on_scanner_registered(&self, status: i32, scanner_id: i32) {
        dbus_generated!()
    }
}