Skip to content

Commit 11fe23a

Browse files
committed
use DvcClientProcessor bound for client
Signed-off-by: uchouT <i@uchout.moe>
1 parent 8fe59c1 commit 11fe23a

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

crates/ironrdp-dvc/src/client.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ pub trait DvcChannelListener: Send {
2525

2626
/// Called for each incoming DYNVC_CREATE_REQ matching this name.
2727
/// Return `None` to reject (NO_LISTENER).
28-
fn create(&mut self, channel_id: DynamicChannelId) -> Option<Box<dyn DvcProcessor>>;
28+
fn create(&mut self, channel_id: DynamicChannelId) -> Option<Box<dyn DvcClientProcessor>>;
2929
}
3030

3131
pub type DynamicChannelListener = Box<dyn DvcChannelListener>;
3232

3333
/// For pre-registered DVC
3434
struct OnceListener {
35-
inner: Option<Box<dyn DvcProcessor>>,
35+
inner: Option<Box<dyn DvcClientProcessor>>,
3636
}
3737

3838
impl OnceListener {
39-
fn new(dvc_processor: impl DvcProcessor + 'static) -> Self {
39+
fn new(dvc_processor: impl DvcClientProcessor + 'static) -> Self {
4040
Self {
4141
inner: Some(Box::new(dvc_processor)),
4242
}
@@ -51,7 +51,7 @@ impl DvcChannelListener for OnceListener {
5151
.channel_name()
5252
}
5353

54-
fn create(&mut self, _channel_id: DynamicChannelId) -> Option<Box<dyn DvcProcessor>> {
54+
fn create(&mut self, _channel_id: DynamicChannelId) -> Option<Box<dyn DvcClientProcessor>> {
5555
self.inner.take()
5656
}
5757
}
@@ -100,7 +100,7 @@ impl DrdynvcClient {
100100
#[must_use]
101101
pub fn with_dynamic_channel<T>(mut self, channel: T) -> Self
102102
where
103-
T: DvcProcessor + 'static,
103+
T: DvcClientProcessor + 'static,
104104
{
105105
self.dynamic_channels.register_once(channel);
106106
self
@@ -115,7 +115,7 @@ impl DrdynvcClient {
115115
/// it will be silently overwritten.
116116
pub fn attach_dynamic_channel<T>(&mut self, channel: T)
117117
where
118-
T: DvcProcessor + 'static,
118+
T: DvcClientProcessor + 'static,
119119
{
120120
self.dynamic_channels.register_once(channel);
121121
}
@@ -152,7 +152,7 @@ impl DrdynvcClient {
152152

153153
pub fn get_dvc_by_type_id<T>(&self) -> Option<&DynamicVirtualChannel>
154154
where
155-
T: DvcProcessor,
155+
T: DvcClientProcessor,
156156
{
157157
self.dynamic_channels.get_by_type_id(TypeId::of::<T>())
158158
}
@@ -303,7 +303,7 @@ impl DynamicChannelSet {
303303
);
304304
}
305305

306-
fn register_once<T: DvcProcessor + 'static>(&mut self, channel: T) {
306+
fn register_once<T: DvcClientProcessor + 'static>(&mut self, channel: T) {
307307
let name = channel.channel_name().to_owned();
308308
self.listeners.insert(
309309
name,

crates/ironrdp-session/src/active_stage.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use ironrdp_connector::ConnectionResult;
55
use ironrdp_connector::connection_activation::ConnectionActivationSequence;
66
use ironrdp_core::{ReadCursor, WriteBuf};
77
use ironrdp_displaycontrol::client::DisplayControlClient;
8-
use ironrdp_dvc::{DrdynvcClient, DvcProcessor, DynamicVirtualChannel};
8+
use ironrdp_dvc::{DrdynvcClient, DvcClientProcessor, DynamicVirtualChannel};
99
use ironrdp_graphics::pointer::DecodedPointer;
1010
use ironrdp_pdu::geometry::InclusiveRectangle;
1111
use ironrdp_pdu::input::fast_path::{FastPathInput, FastPathInputEvent};
@@ -237,7 +237,7 @@ impl ActiveStage {
237237
self.x224_processor.get_svc_processor_mut()
238238
}
239239

240-
pub fn get_dvc<T: DvcProcessor + 'static>(&mut self) -> Option<&DynamicVirtualChannel> {
240+
pub fn get_dvc<T: DvcClientProcessor + 'static>(&mut self) -> Option<&DynamicVirtualChannel> {
241241
self.x224_processor.get_dvc::<T>()
242242
}
243243

crates/ironrdp-session/src/x224/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use ironrdp_connector::connection_activation::ConnectionActivationSequence;
22
use ironrdp_connector::legacy::SendDataIndicationCtx;
33
use ironrdp_core::WriteBuf;
4-
use ironrdp_dvc::{DrdynvcClient, DvcProcessor, DynamicVirtualChannel};
4+
use ironrdp_dvc::{DrdynvcClient, DvcClientProcessor, DynamicVirtualChannel};
55
use ironrdp_pdu::mcs::{DisconnectProviderUltimatum, DisconnectReason, McsMessage};
66
use ironrdp_pdu::rdp::autodetect::{AutoDetectRequest, AutoDetectResponse};
77
use ironrdp_pdu::rdp::headers::ShareDataPdu;
@@ -116,7 +116,7 @@ impl Processor {
116116
process_svc_messages(messages.into(), channel_id, self.user_channel_id)
117117
}
118118

119-
pub fn get_dvc<T: DvcProcessor + 'static>(&self) -> Option<&DynamicVirtualChannel> {
119+
pub fn get_dvc<T: DvcClientProcessor + 'static>(&self) -> Option<&DynamicVirtualChannel> {
120120
self.get_svc_processor::<DrdynvcClient>()?.get_dvc_by_type_id::<T>()
121121
}
122122

ffi/src/connector/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub mod ffi {
1010
use diplomat_runtime::DiplomatWriteable;
1111
use ironrdp::connector::Sequence as _;
1212
use ironrdp::displaycontrol::client::DisplayControlClient;
13-
use ironrdp::dvc::DvcProcessor;
13+
use ironrdp::dvc::DvcClientProcessor;
1414
use ironrdp_dvc_pipe_proxy::DvcNamedPipeProxy;
1515
use tracing::info;
1616

@@ -74,7 +74,7 @@ pub mod ffi {
7474

7575
fn with_dvc<T>(&mut self, processor: T) -> Result<(), Box<IronRdpError>>
7676
where
77-
T: DvcProcessor + 'static,
77+
T: DvcClientProcessor + 'static,
7878
{
7979
let Some(connector) = &mut self.0 else {
8080
return Err(ValueConsumedError::for_item("connector").into());

0 commit comments

Comments
 (0)