refactor(dvc)!: replace DVC wrappers with typed accessors#1377
refactor(dvc)!: replace DVC wrappers with typed accessors#1377uchouT (uchouT) wants to merge 2 commits into
Conversation
409c0be to
11fe23a
Compare
78a24d6 to
b521ec7
Compare
Benoît Cortier (CBenoit)
left a comment
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.
7bfd483 to
f036dd5
Compare
|
lgtm. Claude suggests to relax get_dvc & get_dvc_by_channel_id to &self. Also fix doc for channel_id field in DynamicVirtualChannel. |
9bd0473 to
29bc6f2
Compare
|
Fixed. Since this PR touches a large number of files across the codebase. It's highly prone to merge conflicts if other PRs land before it. |
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>
29bc6f2 to
9db4235
Compare
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.