refactor(dvc)!: replace DVC wrappers with typed accessors#1377
Open
uchouT (uchouT) wants to merge 2 commits into
Open
refactor(dvc)!: replace DVC wrappers with typed accessors#1377uchouT (uchouT) wants to merge 2 commits into
uchouT (uchouT) wants to merge 2 commits into
Conversation
409c0be to
11fe23a
Compare
78a24d6 to
b521ec7
Compare
Benoît Cortier (CBenoit)
left a comment
Member
There was a problem hiding this comment.
Thank you! At a glance, it looks nice! I’m adding this to my review queue for this week!
There was a problem hiding this comment.
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
DynamicVirtualChannelexposure withDynamicChannelRef/DynamicChannelMuttyped 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.
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>
7bfd483 to
f036dd5
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
DrdynvcClient.DvcClientProcessor.BREAKING CHANGE:
DynamicVirtualChannelis no longer public. Client DVC listener/registration APIs now useDvcClientProcessor.