mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-17 02:01:01 +03:00
feat: remote printer (#11231)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -70,6 +70,9 @@ mod service;
|
||||
mod video_qos;
|
||||
pub mod video_service;
|
||||
|
||||
#[cfg(all(target_os = "windows", feature = "flutter"))]
|
||||
pub mod printer_service;
|
||||
|
||||
pub type Childs = Arc<Mutex<Vec<std::process::Child>>>;
|
||||
type ConnMap = HashMap<i32, ConnInner>;
|
||||
|
||||
@@ -129,6 +132,20 @@ pub fn new() -> ServerPtr {
|
||||
server.add_service(Box::new(input_service::new_window_focus()));
|
||||
}
|
||||
}
|
||||
#[cfg(all(target_os = "windows", feature = "flutter"))]
|
||||
{
|
||||
match printer_service::init(&crate::get_app_name()) {
|
||||
Ok(()) => {
|
||||
log::info!("printer service initialized");
|
||||
server.add_service(Box::new(printer_service::new(
|
||||
printer_service::NAME.to_owned(),
|
||||
)));
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("printer service init failed: {}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Arc::new(RwLock::new(server))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user