"session" has a fixed set of supported codecs with associated IDs.
"connector" must expose the set of codecs during capabilities exchange.
It currently uses hard-codes codec IDs in different places.
Move the BitmapCodecs set to ironrdp-pdu. Shared code will be used by
the server, so this is a suitable common place.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
- `iron_init` is renamed to `setup`, so that
- `init` is the function for initializing the WASM module.
- `setup` is the function taking parameters for logger and performing
other setting up operations.
- Since `setup` may be called after `init` is called, it’s possible to
use some functions of the WASM module before calling `setup` if
necessity arises.
- Common initializion code is moved to an hidden "internal" module of
iron-remote-desktop crate, that is thus not part of the public API.
- Restored the "IronRDP is ready" debug log when `setup` is called.
We used to inject the resolved target server address, but that is not
what is expected. Server typically ignores this field so this was not a
problem up until now.
Give a hint to the backend when the channel is actually connected &
ready to process messages.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
As written in the workspace Cargo.toml:
> Note that for better cross-tooling interactions, do not use workspace
dependencies for anything that is not "workspace internal" (e.g.: mostly
dev-dependencies). E.g.: release-plz can’t detect that a dependency has
been
updated in a way warranting a version bump in the dependant if no commit
is
touching a file associated to the crate. It is technically okay to use
that
for "private" (i.e.: not used in the public API) dependencies too, but
we
still want to make follow-up releases to stay up to date with the
community,
even for private dependencies.
Expectation is that release-plz will be able to auto-detect when bumping
dependents is necessary.
Closes#689
The current behaviour of handling unmatched PDUs in fn read_by_hint()
isn't good enough. An unexpected PDUs may be received and fail to be
decoded during Acceptor::step().
Change the code to simply drop unexpected PDUs (as opposed to attempting
to replay the unmatched leftover, which isn't clearly needed)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Adds support for license caching by storing the license obtained
from SERVER_UPGRADE_LICENSE message and sending
CLIENT_LICENSE_INFO if a license requested by the server is already
stored in the cache.
Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
The previous code would (correctly) set a cookie containining the
username, but only when using username/password credentials. When
smart card credentials are used, the cookie would always contain
the empty string.
ironrdp-pdu contains lots of code that we don’t actually need in other crates such as the virtual channels.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Introduce a new error type to split encoding/decoding errors as well as
helper traits and functions to ease porting and conventions.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
When compiled in debug mode, the code checks the expected Action hint.
But in release mode, no checks are done and the it will have to fail
later.
Instead, return whether the PDU is matching the hint, so the caller can
decide what to do in this case.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
#[wasm_bindgen] creates annoying warnings, such as:
rust-analyzer: Function `__wasm_bindgen_generated_Session_apply_inputs` should have snake_case name, e.g. `__wasm_bindgen_generated_session_apply_inputs`
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>