Crate lamco_rdp_clipboard

Crate lamco_rdp_clipboard 

Source
Expand description

§lamco-rdp-clipboard

IronRDP clipboard integration for Rust.

This crate provides the IronRDP CliprdrBackend implementation for RDP clipboard synchronization. It bridges between IronRDP’s clipboard channel and the protocol-agnostic ClipboardSink trait.

§Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                          lamco-rdp-clipboard                        │
│  ┌─────────────────────┐         ┌───────────────────────────────┐  │
│  │ RdpCliprdrBackend   │◄───────►│   ClipboardSink (trait)       │  │
│  │ (CliprdrBackend)    │         │   - Portal                    │  │
│  └─────────────────────┘         │   - X11                       │  │
│            ▲                     │   - Memory (testing)          │  │
│            │                     └───────────────────────────────┘  │
│            │                                                        │
│            ▼                                                        │
│  ┌─────────────────────┐                                           │
│  │ ironrdp-cliprdr     │                                           │
│  │ (CLIPRDR SVC)       │                                           │
│  └─────────────────────┘                                           │
└─────────────────────────────────────────────────────────────────────┘

§Usage

use lamco_rdp_clipboard::{RdpCliprdrBackend, RdpCliprdrFactory};
use lamco_clipboard_core::ClipboardSink;

// Create a factory with your clipboard sink implementation
let factory = RdpCliprdrFactory::new(my_clipboard_sink);

// Use with IronRDP
let backend = factory.build_cliprdr_backend();

§Non-blocking Design

The CliprdrBackend trait methods are called synchronously from the RDP message processing loop. To avoid blocking, this implementation queues events for asynchronous processing and provides a separate event processing loop.

Re-exports§

pub use lamco_clipboard_core;

Structs§

ClipboardEventReceiver
Receiver side of the clipboard event channel.
ClipboardEventSender
Sender side of the clipboard event channel.
ClipboardFormat
A clipboard format with ID and optional name
ClipboardGeneralCapabilityFlags
FileContentsRequest
Represents CLIPRDR_FILECONTENTS_REQUEST
FileContentsResponse
Represents CLIPRDR_FILECONTENTS_RESPONSE
FormatConverter
Handles clipboard data format conversion
FormatDataRequest
Represents CLIPRDR_FORMAT_DATA_REQUEST
FormatDataResponse
Represents CLIPRDR_FORMAT_DATA_RESPONSE
LoopDetector
Detects and prevents clipboard synchronization loops.
RdpCliprdrBackend
RDP clipboard backend that bridges IronRDP and ClipboardSink.
RdpCliprdrFactory
Factory for creating RdpCliprdrBackend instances.

Enums§

ClipboardEvent
Events generated by the clipboard backend for async processing.
ClipboardMessage
Message sent by the OS clipboard backend event loop.
ClipboardRdpError
Errors that can occur during RDP clipboard operations.

Traits§

ClipboardMessageProxy
Proxy to send messages from the os clipboard backend to the main application event loop (e.g. winit event loop).
ClipboardSink
Abstract clipboard backend interface.

Type Aliases§

ClipboardRdpResult
Result type for RDP clipboard operations.