Loading system/gd/rust/linux/client/src/callbacks.rs +8 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,14 @@ impl IBluetoothConnectionCallback for BtConnectionCallback { remote_device.name ); } fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) { print_info!( "Connection to [{}] failed, status = {:?}", remote_device.address.to_string(), status ); } } impl RPCProxy for BtConnectionCallback { Loading system/gd/rust/linux/client/src/dbus_iface.rs +3 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,9 @@ impl IBluetoothConnectionCallback for IBluetoothConnectionCallbackDBus { #[dbus_method("OnDeviceDisconnected", DBusLog::Disable)] fn on_device_disconnected(&mut self, remote_device: BluetoothDevice) {} #[dbus_method("OnDeviceConnectionFailed", DBusLog::Disable)] fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) {} } #[allow(dead_code)] Loading system/gd/rust/linux/mgmt/Cargo.toml +1 −1 Original line number Diff line number Diff line [package] name = "manager_service" version = "0.7.0" version = "0.7.1" edition = "2018" build = "build.rs" Loading system/gd/rust/linux/service/src/iface_bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,14 @@ impl IBluetoothConnectionCallback for BluetoothConnectionCallbackDBus { fn on_device_disconnected(&mut self, remote_device: BluetoothDevice) { dbus_generated!() } #[dbus_method( "OnDeviceConnectionFailed", DBusLog::Enable(DBusLogOptions::LogAll, DBusLogVerbosity::Verbose) )] fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) { dbus_generated!() } } impl_dbus_arg_enum!(BtSdpType); Loading system/gd/rust/linux/stack/src/bluetooth.rs +9 −0 Original line number Diff line number Diff line Loading @@ -574,6 +574,9 @@ pub trait IBluetoothConnectionCallback: RPCProxy { /// Notification sent when a remote device completes HCI disconnection. fn on_device_disconnected(&mut self, remote_device: BluetoothDevice); /// Notification sent when a remote device fails to complete HCI connection. fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus); } /// Implementation of the adapter API. Loading Loading @@ -2061,6 +2064,12 @@ impl BtifBluetoothCallbacks for Bluetooth { conn_direction, hci_reason, ); self.connection_callbacks.for_all_callbacks(|callback| { callback.on_device_connection_failed( BluetoothDevice::new(addr, String::from("")), status, ); }); return; } Loading Loading
system/gd/rust/linux/client/src/callbacks.rs +8 −0 Original line number Diff line number Diff line Loading @@ -377,6 +377,14 @@ impl IBluetoothConnectionCallback for BtConnectionCallback { remote_device.name ); } fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) { print_info!( "Connection to [{}] failed, status = {:?}", remote_device.address.to_string(), status ); } } impl RPCProxy for BtConnectionCallback { Loading
system/gd/rust/linux/client/src/dbus_iface.rs +3 −0 Original line number Diff line number Diff line Loading @@ -677,6 +677,9 @@ impl IBluetoothConnectionCallback for IBluetoothConnectionCallbackDBus { #[dbus_method("OnDeviceDisconnected", DBusLog::Disable)] fn on_device_disconnected(&mut self, remote_device: BluetoothDevice) {} #[dbus_method("OnDeviceConnectionFailed", DBusLog::Disable)] fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) {} } #[allow(dead_code)] Loading
system/gd/rust/linux/mgmt/Cargo.toml +1 −1 Original line number Diff line number Diff line [package] name = "manager_service" version = "0.7.0" version = "0.7.1" edition = "2018" build = "build.rs" Loading
system/gd/rust/linux/service/src/iface_bluetooth.rs +8 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,14 @@ impl IBluetoothConnectionCallback for BluetoothConnectionCallbackDBus { fn on_device_disconnected(&mut self, remote_device: BluetoothDevice) { dbus_generated!() } #[dbus_method( "OnDeviceConnectionFailed", DBusLog::Enable(DBusLogOptions::LogAll, DBusLogVerbosity::Verbose) )] fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus) { dbus_generated!() } } impl_dbus_arg_enum!(BtSdpType); Loading
system/gd/rust/linux/stack/src/bluetooth.rs +9 −0 Original line number Diff line number Diff line Loading @@ -574,6 +574,9 @@ pub trait IBluetoothConnectionCallback: RPCProxy { /// Notification sent when a remote device completes HCI disconnection. fn on_device_disconnected(&mut self, remote_device: BluetoothDevice); /// Notification sent when a remote device fails to complete HCI connection. fn on_device_connection_failed(&mut self, remote_device: BluetoothDevice, status: BtStatus); } /// Implementation of the adapter API. Loading Loading @@ -2061,6 +2064,12 @@ impl BtifBluetoothCallbacks for Bluetooth { conn_direction, hci_reason, ); self.connection_callbacks.for_all_callbacks(|callback| { callback.on_device_connection_failed( BluetoothDevice::new(addr, String::from("")), status, ); }); return; } Loading