Skip to content

refactor(dvc)!: replace DVC wrappers with typed accessors#1377

Open
uchouT (uchouT) wants to merge 2 commits into
Devolutions:masterfrom
uchouT:refactor/dvc
Open

refactor(dvc)!: replace DVC wrappers with typed accessors#1377
uchouT (uchouT) wants to merge 2 commits into
Devolutions:masterfrom
uchouT:refactor/dvc

Conversation

@uchouT

@uchouT uchouT (uchouT) commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #1368. This is not urgent; review whenever the DVC API direction is worth revisiting.

Rework DVC channel access APIs so callers can recover a typed processor together with its dynamic channel id, without exposing internal channel wrapper types.

  • Add typed borrowed DVC accessors carrying both channel id and processor borrow for DrdynvcClient.
  • Keep dynamic channel wrapper types private.
  • Align client listener/registration APIs on DvcClientProcessor.

BREAKING CHANGE: DynamicVirtualChannel is no longer public. Client DVC listener/registration APIs now use DvcClientProcessor.

@uchouT uchouT (uchouT) changed the title fix(dvc)!: use DvcClientProcessor for client DVCs refactor(dvc)!: use DvcClientProcessor for client DVCs Jun 18, 2026
@uchouT uchouT (uchouT) marked this pull request as draft June 18, 2026 15:11
@uchouT uchouT (uchouT) force-pushed the refactor/dvc branch 5 times, most recently from 78a24d6 to b521ec7 Compare June 23, 2026 09:39
@uchouT uchouT (uchouT) changed the title refactor(dvc)!: use DvcClientProcessor for client DVCs refactor(dvc)!: replace DVC wrappers with typed accessors Jun 23, 2026
@uchouT uchouT (uchouT) marked this pull request as ready for review June 23, 2026 09:51

@CBenoit Benoît Cortier (CBenoit) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! At a glance, it looks nice! I’m adding this to my review queue for this week!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Dynamic Virtual Channel (DRDYNVC) public API to hide internal channel wrapper types while still allowing callers to recover a typed processor together with its dynamic channel ID via borrowed typed accessors.

Changes:

  • Replace public DynamicVirtualChannel exposure with DynamicChannelRef / DynamicChannelMut typed borrowed accessors that carry the channel ID.
  • Split client/server processor trait bounds (DvcClientProcessor, DvcServerProcessor) and align listener/registration APIs to the client processor trait.
  • Update session + FFI call sites to use the new typed accessor APIs and trait bounds.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ffi/src/connector/mod.rs Updates connector DVC registration to use DvcClientProcessor.
crates/ironrdp-session/src/x224/mod.rs Adapts X224 DVC lookup helpers to return DynamicChannelRef<'_, T>.
crates/ironrdp-session/src/active_stage.rs Uses typed DVC accessors when encoding DisplayControl resize messages.
crates/ironrdp-dvc/src/server.rs Switches server-side channel storage to DvcServerProcessor and adds typed accessors by channel ID.
crates/ironrdp-dvc/src/lib.rs Removes the public DynamicVirtualChannel wrapper and defines DynamicChannelRef / DynamicChannelMut.
crates/ironrdp-dvc/src/client.rs Keeps the wrapper private on the client side and introduces typed get_dvc* accessors.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread crates/ironrdp-session/src/active_stage.rs
Comment thread crates/ironrdp-dvc/src/client.rs
Rework DVC channel access APIs around typed processor handles.

- Make client dynamic channel wrapper `DynamicVirtualChannel` types
  private.
- Use typed dynamic channel ref/mut accessors carrying both channel id
  and processor borrow.
- Align client DVC listener/registration APIs on `DvcClientProcessor`.

BREAKING CHANGE: UrbdrcClient no longer expose `DynamicVirtualChannel`.
client DVC listener/registration APIs now return/accept
`DvcClientProcessor`.

Signed-off-by: uchouT <i@uchout.moe>
Signed-off-by: uchouT <i@uchout.moe>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants