Loading system/gd/rust/linux/client/src/command_handler.rs +8 −9 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use std::sync::{Arc, Mutex}; use crate::console_yellow; use crate::print_info; use crate::{BluetoothDBus, BluetoothManagerDBus}; struct BtCallback { objpath: String, Loading Loading @@ -60,26 +61,24 @@ impl RPCProxy for BtCallback { } /// Handles string command entered from command line. pub struct CommandHandler<TBluetoothManager: IBluetoothManager, TBluetooth: IBluetooth> { bluetooth_manager: Arc<Mutex<Box<TBluetoothManager>>>, bluetooth: Arc<Mutex<Box<TBluetooth>>>, pub(crate) struct CommandHandler { bluetooth_manager: Arc<Mutex<Box<BluetoothManagerDBus>>>, bluetooth: Arc<Mutex<Box<BluetoothDBus>>>, is_bluetooth_callback_registered: bool, commands: Vec<String>, } impl<TBluetoothManager: IBluetoothManager, TBluetooth: IBluetooth> CommandHandler<TBluetoothManager, TBluetooth> { impl CommandHandler { /// Creates a new CommandHandler. /// /// * `commands` - List of commands for `help`. pub fn new( bluetooth_manager: Arc<Mutex<Box<TBluetoothManager>>>, bluetooth: Arc<Mutex<Box<TBluetooth>>>, bluetooth_manager: Arc<Mutex<Box<BluetoothManagerDBus>>>, bluetooth: Arc<Mutex<Box<BluetoothDBus>>>, commands: Vec<String>, ) -> CommandHandler<TBluetoothManager, TBluetooth> { ) -> CommandHandler { CommandHandler { bluetooth_manager, bluetooth, Loading Loading
system/gd/rust/linux/client/src/command_handler.rs +8 −9 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ use std::sync::{Arc, Mutex}; use crate::console_yellow; use crate::print_info; use crate::{BluetoothDBus, BluetoothManagerDBus}; struct BtCallback { objpath: String, Loading Loading @@ -60,26 +61,24 @@ impl RPCProxy for BtCallback { } /// Handles string command entered from command line. pub struct CommandHandler<TBluetoothManager: IBluetoothManager, TBluetooth: IBluetooth> { bluetooth_manager: Arc<Mutex<Box<TBluetoothManager>>>, bluetooth: Arc<Mutex<Box<TBluetooth>>>, pub(crate) struct CommandHandler { bluetooth_manager: Arc<Mutex<Box<BluetoothManagerDBus>>>, bluetooth: Arc<Mutex<Box<BluetoothDBus>>>, is_bluetooth_callback_registered: bool, commands: Vec<String>, } impl<TBluetoothManager: IBluetoothManager, TBluetooth: IBluetooth> CommandHandler<TBluetoothManager, TBluetooth> { impl CommandHandler { /// Creates a new CommandHandler. /// /// * `commands` - List of commands for `help`. pub fn new( bluetooth_manager: Arc<Mutex<Box<TBluetoothManager>>>, bluetooth: Arc<Mutex<Box<TBluetooth>>>, bluetooth_manager: Arc<Mutex<Box<BluetoothManagerDBus>>>, bluetooth: Arc<Mutex<Box<BluetoothDBus>>>, commands: Vec<String>, ) -> CommandHandler<TBluetoothManager, TBluetooth> { ) -> CommandHandler { CommandHandler { bluetooth_manager, bluetooth, Loading