mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
revert back to async_trait since having to use 1.75 because of win7
support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
use crate::client::*;
|
||||
use async_trait::async_trait;
|
||||
use hbb_common::{
|
||||
config::PeerConfig,
|
||||
config::READ_TIMEOUT,
|
||||
@@ -44,6 +45,7 @@ impl Session {
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Interface for Session {
|
||||
fn get_login_config_handler(&self) -> Arc<RwLock<LoginConfigHandler>> {
|
||||
return self.lc.clone();
|
||||
|
||||
@@ -7,6 +7,7 @@ use std::{
|
||||
sync::{mpsc, Arc, Mutex, RwLock},
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
#[cfg(not(any(target_os = "android", target_os = "linux")))]
|
||||
use cpal::{
|
||||
@@ -2761,6 +2762,7 @@ async fn send_switch_login_request(
|
||||
}
|
||||
|
||||
/// Interface for client to send data and commands.
|
||||
#[async_trait]
|
||||
pub trait Interface: Send + Clone + 'static + Sized {
|
||||
/// Send message data to remote peer.
|
||||
fn send(&self, data: Data);
|
||||
|
||||
@@ -17,7 +17,7 @@ use core_graphics::{
|
||||
display::{kCGNullWindowID, kCGWindowListOptionOnScreenOnly, CGWindowListCopyWindowInfo},
|
||||
window::{kCGWindowName, kCGWindowOwnerPID},
|
||||
};
|
||||
use hbb_common::{allow_err, anyhow::anyhow, bail, libc, log, message_proto::Resolution};
|
||||
use hbb_common::{anyhow::anyhow, bail, log, message_proto::Resolution};
|
||||
use include_dir::{include_dir, Dir};
|
||||
use objc::{class, msg_send, sel, sel_impl};
|
||||
use scrap::{libc::c_void, quartz::ffi::*};
|
||||
|
||||
@@ -2,6 +2,7 @@ use crate::{
|
||||
common::{get_supported_keyboard_modes, is_keyboard_mode_supported},
|
||||
input::{MOUSE_BUTTON_LEFT, MOUSE_TYPE_DOWN, MOUSE_TYPE_UP, MOUSE_TYPE_WHEEL},
|
||||
};
|
||||
use async_trait::async_trait;
|
||||
use bytes::Bytes;
|
||||
use rdev::{Event, EventType::*, KeyCode};
|
||||
use std::{
|
||||
@@ -1370,6 +1371,7 @@ impl<T: InvokeUiSession> DerefMut for Session<T> {
|
||||
|
||||
impl<T: InvokeUiSession> FileManager for Session<T> {}
|
||||
|
||||
#[async_trait]
|
||||
impl<T: InvokeUiSession> Interface for Session<T> {
|
||||
fn get_lch(&self) -> Arc<RwLock<LoginConfigHandler>> {
|
||||
return self.lc.clone();
|
||||
|
||||
Reference in New Issue
Block a user