-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cliprdr): Implement CLIPRDR SVC for Windows platform.
This branch also includes refactoring changes by @ibeckermayer from #196 and #197 Co-authored-by: Isaiah Becker-Mayer <isaiah@goteleport.com>
- Loading branch information
1 parent
fe1567c
commit cf7d682
Showing
34 changed files
with
1,868 additions
and
234 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
use ironrdp::cliprdr::backend::{ClipboardMessage, ClipboardMessageProxy}; | ||
use tokio::sync::mpsc; | ||
|
||
use crate::rdp::RdpInputEvent; | ||
|
||
/// Shim for sending and receiving CLIPRDR events as `RdpInputEvent` | ||
#[derive(Clone, Debug)] | ||
pub struct ClientClipboardMessageProxy { | ||
tx: mpsc::UnboundedSender<RdpInputEvent>, | ||
} | ||
|
||
impl ClientClipboardMessageProxy { | ||
pub fn new(tx: mpsc::UnboundedSender<RdpInputEvent>) -> Self { | ||
Self { tx } | ||
} | ||
} | ||
|
||
impl ClipboardMessageProxy for ClientClipboardMessageProxy { | ||
fn send_clipboard_message(&self, message: ClipboardMessage) { | ||
if self.tx.send(RdpInputEvent::Clipboard(message)).is_err() { | ||
error!("Failed to send os clipboard message, receiver is closed"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
#[macro_use] | ||
extern crate tracing; | ||
|
||
pub mod clipboard; | ||
pub mod config; | ||
pub mod gui; | ||
pub mod rdp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "ironrdp-cliprdr-native" | ||
version = "0.1.0" | ||
readme = "README.md" | ||
description = "Native CLIPRDR static channel backend implementations for IronRDP" | ||
edition.workspace = true | ||
license.workspace = true | ||
|
||
homepage.workspace = true | ||
repository.workspace = true | ||
authors.workspace = true | ||
keywords.workspace = true | ||
categories.workspace = true | ||
|
||
[dependencies] | ||
ironrdp-cliprdr.workspace = true | ||
ironrdp-svc.workspace = true | ||
thiserror.workspace = true | ||
tracing.workspace = true | ||
|
||
[target.'cfg(windows)'.dependencies] | ||
|
||
windows = { version = "0.48.0", features = [ | ||
"Win32_Foundation", | ||
"Win32_System_DataExchange", | ||
"Win32_System_Memory", | ||
"Win32_UI_Shell", | ||
"Win32_UI_WindowsAndMessaging" | ||
] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/// Native CLIPRDR backend implementations. Currently only Windows is supported. | ||
#[cfg(windows)] | ||
mod windows; | ||
#[cfg(windows)] | ||
pub use crate::windows::{WinClipboard, WinCliprdrError, WinCliprdrResult}; |
Oops, something went wrong.