Loading system/gd/rust/linux/client/src/callbacks.rs +0 −48 Original line number Diff line number Diff line Loading @@ -59,18 +59,10 @@ impl IBluetoothManagerCallback for BtManagerCallback { } impl RPCProxy for BtManagerCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_manager_callback_dbus_intf( Loading Loading @@ -227,18 +219,10 @@ impl IBluetoothCallback for BtCallback { } impl RPCProxy for BtCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_callback_dbus_intf( Loading Loading @@ -280,18 +264,10 @@ impl IBluetoothConnectionCallback for BtConnectionCallback { } impl RPCProxy for BtConnectionCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_connection_callback_dbus_intf( Loading Loading @@ -338,18 +314,10 @@ impl IScannerCallback for ScannerCallback { } impl RPCProxy for ScannerCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_scanner_callback_dbus_intf( Loading Loading @@ -509,18 +477,10 @@ impl IBluetoothGattCallback for BtGattCallback { } impl RPCProxy for BtGattCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_gatt_callback_dbus_intf( Loading Loading @@ -559,18 +519,10 @@ impl ISuspendCallback for SuspendCallback { } impl RPCProxy for SuspendCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_suspend_callback_dbus_intf( Loading system/gd/rust/linux/client/src/dbus_iface.rs +7 −105 Original line number Diff line number Diff line Loading @@ -127,22 +127,7 @@ pub struct BluetoothDeviceDBus { struct IBluetoothCallbackDBus {} impl RPCProxy for IBluetoothCallbackDBus { // Dummy implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_callback_dbus_intf, Loading Loading @@ -186,22 +171,7 @@ impl IBluetoothCallback for IBluetoothCallbackDBus { struct IBluetoothConnectionCallbackDBus {} impl RPCProxy for IBluetoothConnectionCallbackDBus { // Dummy implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothConnectionCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_connection_callback_dbus_intf, Loading @@ -217,18 +187,7 @@ impl IBluetoothConnectionCallback for IBluetoothConnectionCallbackDBus { struct IScannerCallbackDBus {} impl RPCProxy for IScannerCallbackDBus { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IScannerCallbackDBus {} #[generate_dbus_exporter( export_scanner_callback_dbus_intf, Loading Loading @@ -554,22 +513,7 @@ impl IBluetoothManager for BluetoothManagerDBus { struct IBluetoothManagerCallbackDBus {} impl RPCProxy for IBluetoothManagerCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothManagerCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_manager_callback_dbus_intf, Loading Loading @@ -1023,22 +967,7 @@ impl IBluetoothGatt for BluetoothGattDBus { struct IBluetoothGattCallbackDBus {} impl RPCProxy for IBluetoothGattCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothGattCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_gatt_callback_dbus_intf, Loading Loading @@ -1246,19 +1175,7 @@ impl IBluetoothSocketManager for BluetoothSocketManagerDBus { struct IBluetoothSocketManagerCallbacksDBus {} impl RPCProxy for IBluetoothSocketManagerCallbacksDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothSocketManagerCallbacksDBus {} #[generate_dbus_exporter(export_socket_callback_dbus_intf, "org.chromium.bluetooth.SocketCallback")] impl IBluetoothSocketManagerCallbacks for IBluetoothSocketManagerCallbacksDBus { Loading Loading @@ -1334,22 +1251,7 @@ impl ISuspend for SuspendDBus { struct ISuspendCallbackDBus {} impl RPCProxy for ISuspendCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for ISuspendCallbackDBus {} #[generate_dbus_exporter( export_suspend_callback_dbus_intf, Loading system/gd/rust/linux/dbus_projection/dbus_macros/src/lib.rs +1 −9 Original line number Diff line number Diff line Loading @@ -774,14 +774,7 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream { let gen = quote! { #ori_item impl RPCProxy for #self_ty { fn register_disconnect(&mut self, _disconnect_callback: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for #self_ty {} struct #struct_ident { conn: std::sync::Arc<dbus::nonblock::SyncConnection>, Loading @@ -806,7 +799,6 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream { fn unregister(&mut self, id: u32) -> bool { self.disconnect_watcher.lock().unwrap().remove(self.remote.clone(), id) } fn export_for_rpc(self: Box<Self>) {} } impl DBusArg for Box<dyn #trait_ + Send> { Loading system/gd/rust/linux/mgmt/src/dbus_iface.rs +1 −13 Original line number Diff line number Diff line Loading @@ -55,19 +55,7 @@ impl ISuspend for SuspendDBus { #[allow(dead_code)] struct ISuspendCallbackDBus {} impl RPCProxy for ISuspendCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for ISuspendCallbackDBus {} #[generate_dbus_exporter( export_suspend_callback_dbus_intf, Loading system/gd/rust/linux/mgmt/src/powerd_suspend_manager.rs +0 −8 Original line number Diff line number Diff line Loading @@ -144,18 +144,10 @@ impl ISuspendCallback for SuspendCallback { } impl RPCProxy for SuspendCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_suspend_callback_dbus_intf( Loading Loading
system/gd/rust/linux/client/src/callbacks.rs +0 −48 Original line number Diff line number Diff line Loading @@ -59,18 +59,10 @@ impl IBluetoothManagerCallback for BtManagerCallback { } impl RPCProxy for BtManagerCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_manager_callback_dbus_intf( Loading Loading @@ -227,18 +219,10 @@ impl IBluetoothCallback for BtCallback { } impl RPCProxy for BtCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_callback_dbus_intf( Loading Loading @@ -280,18 +264,10 @@ impl IBluetoothConnectionCallback for BtConnectionCallback { } impl RPCProxy for BtConnectionCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_connection_callback_dbus_intf( Loading Loading @@ -338,18 +314,10 @@ impl IScannerCallback for ScannerCallback { } impl RPCProxy for ScannerCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_scanner_callback_dbus_intf( Loading Loading @@ -509,18 +477,10 @@ impl IBluetoothGattCallback for BtGattCallback { } impl RPCProxy for BtGattCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_bluetooth_gatt_callback_dbus_intf( Loading Loading @@ -559,18 +519,10 @@ impl ISuspendCallback for SuspendCallback { } impl RPCProxy for SuspendCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_suspend_callback_dbus_intf( Loading
system/gd/rust/linux/client/src/dbus_iface.rs +7 −105 Original line number Diff line number Diff line Loading @@ -127,22 +127,7 @@ pub struct BluetoothDeviceDBus { struct IBluetoothCallbackDBus {} impl RPCProxy for IBluetoothCallbackDBus { // Dummy implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_callback_dbus_intf, Loading Loading @@ -186,22 +171,7 @@ impl IBluetoothCallback for IBluetoothCallbackDBus { struct IBluetoothConnectionCallbackDBus {} impl RPCProxy for IBluetoothConnectionCallbackDBus { // Dummy implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothConnectionCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_connection_callback_dbus_intf, Loading @@ -217,18 +187,7 @@ impl IBluetoothConnectionCallback for IBluetoothConnectionCallbackDBus { struct IScannerCallbackDBus {} impl RPCProxy for IScannerCallbackDBus { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IScannerCallbackDBus {} #[generate_dbus_exporter( export_scanner_callback_dbus_intf, Loading Loading @@ -554,22 +513,7 @@ impl IBluetoothManager for BluetoothManagerDBus { struct IBluetoothManagerCallbackDBus {} impl RPCProxy for IBluetoothManagerCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothManagerCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_manager_callback_dbus_intf, Loading Loading @@ -1023,22 +967,7 @@ impl IBluetoothGatt for BluetoothGattDBus { struct IBluetoothGattCallbackDBus {} impl RPCProxy for IBluetoothGattCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothGattCallbackDBus {} #[generate_dbus_exporter( export_bluetooth_gatt_callback_dbus_intf, Loading Loading @@ -1246,19 +1175,7 @@ impl IBluetoothSocketManager for BluetoothSocketManagerDBus { struct IBluetoothSocketManagerCallbacksDBus {} impl RPCProxy for IBluetoothSocketManagerCallbacksDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for IBluetoothSocketManagerCallbacksDBus {} #[generate_dbus_exporter(export_socket_callback_dbus_intf, "org.chromium.bluetooth.SocketCallback")] impl IBluetoothSocketManagerCallbacks for IBluetoothSocketManagerCallbacksDBus { Loading Loading @@ -1334,22 +1251,7 @@ impl ISuspend for SuspendDBus { struct ISuspendCallbackDBus {} impl RPCProxy for ISuspendCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for ISuspendCallbackDBus {} #[generate_dbus_exporter( export_suspend_callback_dbus_intf, Loading
system/gd/rust/linux/dbus_projection/dbus_macros/src/lib.rs +1 −9 Original line number Diff line number Diff line Loading @@ -774,14 +774,7 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream { let gen = quote! { #ori_item impl RPCProxy for #self_ty { fn register_disconnect(&mut self, _disconnect_callback: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for #self_ty {} struct #struct_ident { conn: std::sync::Arc<dbus::nonblock::SyncConnection>, Loading @@ -806,7 +799,6 @@ pub fn dbus_proxy_obj(attr: TokenStream, item: TokenStream) -> TokenStream { fn unregister(&mut self, id: u32) -> bool { self.disconnect_watcher.lock().unwrap().remove(self.remote.clone(), id) } fn export_for_rpc(self: Box<Self>) {} } impl DBusArg for Box<dyn #trait_ + Send> { Loading
system/gd/rust/linux/mgmt/src/dbus_iface.rs +1 −13 Original line number Diff line number Diff line Loading @@ -55,19 +55,7 @@ impl ISuspend for SuspendDBus { #[allow(dead_code)] struct ISuspendCallbackDBus {} impl RPCProxy for ISuspendCallbackDBus { // Placeholder implementations just to satisfy impl RPCProxy requirements. fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { String::from("") } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) {} } impl RPCProxy for ISuspendCallbackDBus {} #[generate_dbus_exporter( export_suspend_callback_dbus_intf, Loading
system/gd/rust/linux/mgmt/src/powerd_suspend_manager.rs +0 −8 Original line number Diff line number Diff line Loading @@ -144,18 +144,10 @@ impl ISuspendCallback for SuspendCallback { } impl RPCProxy for SuspendCallback { fn register_disconnect(&mut self, _f: Box<dyn Fn(u32) + Send>) -> u32 { 0 } fn get_object_id(&self) -> String { self.objpath.clone() } fn unregister(&mut self, _id: u32) -> bool { false } fn export_for_rpc(self: Box<Self>) { let cr = self.dbus_crossroads.clone(); let iface = export_suspend_callback_dbus_intf( Loading