Adds all remote manipulation commands for `service` to the `machine`, using `console` to display information and `storage` to manipulate the remote drives.
(
machine: &mut MachineBuilder,
service: Rc<RefCell<dyn Service>>,
console: Rc<RefCell<dyn Console>>,
storage: Rc<RefCell<Storage>>,
exec_base_url: S,
)
| 590 | /// Adds all remote manipulation commands for `service` to the `machine`, using `console` to |
| 591 | /// display information and `storage` to manipulate the remote drives. |
| 592 | pub fn add_all<S: Into<String>>( |
| 593 | machine: &mut MachineBuilder, |
| 594 | service: Rc<RefCell<dyn Service>>, |
| 595 | console: Rc<RefCell<dyn Console>>, |
| 596 | storage: Rc<RefCell<Storage>>, |
| 597 | exec_base_url: S, |
| 598 | ) { |
| 599 | storage |
| 600 | .borrow_mut() |
| 601 | .register_scheme("cloud", Box::from(CloudDriveFactory::new(service.clone()))); |
| 602 | |
| 603 | machine.add_callable(LoginCommand::new(service.clone(), console.clone(), storage.clone())); |
| 604 | machine.add_callable(LogoutCommand::new(service.clone(), console.clone(), storage.clone())); |
| 605 | machine.add_callable(ShareCommand::new( |
| 606 | service.clone(), |
| 607 | console.clone(), |
| 608 | storage, |
| 609 | exec_base_url, |
| 610 | )); |
| 611 | machine.add_callable(SignupCommand::new(service, console)); |
| 612 | } |
| 613 | |
| 614 | #[cfg(test)] |
| 615 | mod tests { |
no test coverage detected