Loading floss/pandora/floss/qa_client.py +26 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,14 @@ class BluetoothQACallbacks: """ pass def on_send_hid_virtual_unplug_completed(self, status): """Called when send hid virtual unplug completed. Args: status: BtStatus. """ pass class FlossQAClient(BluetoothQACallbacks): """Handles method calls to and callbacks from the QA interface.""" Loading Loading @@ -187,6 +195,15 @@ class FlossQAClient(BluetoothQACallbacks): for observer in self.observers.values(): observer.on_send_hid_data_completed(status) def OnSendHIDVirtualUnplugComplete(self, status): """Handles send HID virtual unplug complete callback. Args: status: BtStatus. """ for observer in self.observers.values(): observer.on_send_hid_virtual_unplug_completed(status) def __init__(self, bus, hci): """Constructs the client. Loading Loading @@ -269,6 +286,15 @@ class FlossQAClient(BluetoothQACallbacks): """ logging.debug('on_send_hid_data_completed: status: %s', status) @utils.glib_callback() def on_send_hid_data_completed(self, status): """Handles send HID virtual unplug completed callback. Args: status: BtStatus. """ logging.debug('on_send_hid_virtual_unplug_completed: status: %s', status) @utils.glib_call(False) def has_proxy(self): """Checks whether QA proxy can be acquired.""" Loading system/gd/rust/linux/client/src/callbacks.rs +4 −0 Original line number Diff line number Diff line Loading @@ -1402,6 +1402,10 @@ impl IBluetoothQACallback for QACallback { fn on_send_hid_data_completed(&mut self, status: BtStatus) { print_info!("Send HID data: {:?}", status); } fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { print_info!("Send HID virtual unplug: {:?}", status); } } impl RPCProxy for QACallback { Loading system/gd/rust/linux/client/src/command_handler.rs +11 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,7 @@ fn build_commands() -> HashMap<String, CommandOption> { String::from("hid get-report <address> <Input|Output|Feature> <report_id>"), String::from("hid set-report <address> <Input|Output|Feature> <report_value>"), String::from("hid send-data <address> <data>"), String::from("hid virtual-unplug <address>"), ], description: String::from("Socket manager utilities."), function_pointer: CommandHandler::cmd_hid, Loading Loading @@ -2044,6 +2045,16 @@ impl CommandHandler { self.context.lock().unwrap().qa_dbus.as_mut().unwrap().send_hid_data(addr, data); } "virtual-unplug" => { let addr = RawAddress::from_string(get_arg(args, 1)?).ok_or("Invalid Address")?; self.context .lock() .unwrap() .qa_dbus .as_mut() .unwrap() .send_hid_virtual_unplug(addr); } _ => return Err(CommandError::InvalidArgs), }; Loading system/gd/rust/linux/client/src/dbus_iface.rs +8 −0 Original line number Diff line number Diff line Loading @@ -2583,6 +2583,10 @@ impl IBluetoothQA for BluetoothQADBus { fn send_hid_data(&self, addr: RawAddress, data: String) { dbus_generated!() } #[dbus_method("SendHIDVirtualUnplug")] fn send_hid_virtual_unplug(&self, addr: RawAddress) { dbus_generated!() } } #[allow(dead_code)] Loading Loading @@ -2624,6 +2628,10 @@ impl IBluetoothQACallback for IBluetoothQACallbackDBus { fn on_send_hid_data_completed(&mut self, status: BtStatus) { dbus_generated!() } #[dbus_method("OnSendHIDVirtualUnplugComplete", DBusLog::Disable)] fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { dbus_generated!() } } #[derive(Clone)] Loading system/gd/rust/linux/service/src/iface_bluetooth_qa.rs +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ impl IBluetoothQA for IBluetoothQADBus { fn send_hid_data(&self, addr: RawAddress, data: String) { dbus_generated!() } #[dbus_method("SendHIDVirtualUnplug")] fn send_hid_virtual_unplug(&self, addr: RawAddress) { dbus_generated!() } } #[dbus_proxy_obj(QACallback, "org.chromium.bluetooth.QACallback")] Loading Loading @@ -97,4 +101,8 @@ impl IBluetoothQACallback for IBluetoothQACallbackDBus { fn on_send_hid_data_completed(&mut self, status: BtStatus) { dbus_generated!() } #[dbus_method("OnSendHIDVirtualUnplugComplete")] fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { dbus_generated!() } } Loading
floss/pandora/floss/qa_client.py +26 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,14 @@ class BluetoothQACallbacks: """ pass def on_send_hid_virtual_unplug_completed(self, status): """Called when send hid virtual unplug completed. Args: status: BtStatus. """ pass class FlossQAClient(BluetoothQACallbacks): """Handles method calls to and callbacks from the QA interface.""" Loading Loading @@ -187,6 +195,15 @@ class FlossQAClient(BluetoothQACallbacks): for observer in self.observers.values(): observer.on_send_hid_data_completed(status) def OnSendHIDVirtualUnplugComplete(self, status): """Handles send HID virtual unplug complete callback. Args: status: BtStatus. """ for observer in self.observers.values(): observer.on_send_hid_virtual_unplug_completed(status) def __init__(self, bus, hci): """Constructs the client. Loading Loading @@ -269,6 +286,15 @@ class FlossQAClient(BluetoothQACallbacks): """ logging.debug('on_send_hid_data_completed: status: %s', status) @utils.glib_callback() def on_send_hid_data_completed(self, status): """Handles send HID virtual unplug completed callback. Args: status: BtStatus. """ logging.debug('on_send_hid_virtual_unplug_completed: status: %s', status) @utils.glib_call(False) def has_proxy(self): """Checks whether QA proxy can be acquired.""" Loading
system/gd/rust/linux/client/src/callbacks.rs +4 −0 Original line number Diff line number Diff line Loading @@ -1402,6 +1402,10 @@ impl IBluetoothQACallback for QACallback { fn on_send_hid_data_completed(&mut self, status: BtStatus) { print_info!("Send HID data: {:?}", status); } fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { print_info!("Send HID virtual unplug: {:?}", status); } } impl RPCProxy for QACallback { Loading
system/gd/rust/linux/client/src/command_handler.rs +11 −0 Original line number Diff line number Diff line Loading @@ -314,6 +314,7 @@ fn build_commands() -> HashMap<String, CommandOption> { String::from("hid get-report <address> <Input|Output|Feature> <report_id>"), String::from("hid set-report <address> <Input|Output|Feature> <report_value>"), String::from("hid send-data <address> <data>"), String::from("hid virtual-unplug <address>"), ], description: String::from("Socket manager utilities."), function_pointer: CommandHandler::cmd_hid, Loading Loading @@ -2044,6 +2045,16 @@ impl CommandHandler { self.context.lock().unwrap().qa_dbus.as_mut().unwrap().send_hid_data(addr, data); } "virtual-unplug" => { let addr = RawAddress::from_string(get_arg(args, 1)?).ok_or("Invalid Address")?; self.context .lock() .unwrap() .qa_dbus .as_mut() .unwrap() .send_hid_virtual_unplug(addr); } _ => return Err(CommandError::InvalidArgs), }; Loading
system/gd/rust/linux/client/src/dbus_iface.rs +8 −0 Original line number Diff line number Diff line Loading @@ -2583,6 +2583,10 @@ impl IBluetoothQA for BluetoothQADBus { fn send_hid_data(&self, addr: RawAddress, data: String) { dbus_generated!() } #[dbus_method("SendHIDVirtualUnplug")] fn send_hid_virtual_unplug(&self, addr: RawAddress) { dbus_generated!() } } #[allow(dead_code)] Loading Loading @@ -2624,6 +2628,10 @@ impl IBluetoothQACallback for IBluetoothQACallbackDBus { fn on_send_hid_data_completed(&mut self, status: BtStatus) { dbus_generated!() } #[dbus_method("OnSendHIDVirtualUnplugComplete", DBusLog::Disable)] fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { dbus_generated!() } } #[derive(Clone)] Loading
system/gd/rust/linux/service/src/iface_bluetooth_qa.rs +8 −0 Original line number Diff line number Diff line Loading @@ -65,6 +65,10 @@ impl IBluetoothQA for IBluetoothQADBus { fn send_hid_data(&self, addr: RawAddress, data: String) { dbus_generated!() } #[dbus_method("SendHIDVirtualUnplug")] fn send_hid_virtual_unplug(&self, addr: RawAddress) { dbus_generated!() } } #[dbus_proxy_obj(QACallback, "org.chromium.bluetooth.QACallback")] Loading Loading @@ -97,4 +101,8 @@ impl IBluetoothQACallback for IBluetoothQACallbackDBus { fn on_send_hid_data_completed(&mut self, status: BtStatus) { dbus_generated!() } #[dbus_method("OnSendHIDVirtualUnplugComplete")] fn on_send_hid_virtual_unplug_completed(&mut self, status: BtStatus) { dbus_generated!() } }