Those flags are set both by client and server. Even if the server
doesn't send those commands yet, this should be supported by most
clients.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Use u16 since that's the limit for resolution and bitmap data.
Use non-zero types for width & height, to avoid various issues, such as
division by zero.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
The fragment index is not correctly updated, staying at 0, making
invalid series of First/First/..Last.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Since FreeRDP commit
7cef0cb8d6cfc2307af967a851f44ad6c376a24d ("Refactored capability
parsing"), protocol version default to 0. This is probably an issue
there, but IronRDP can also be tolerant here...
Add a new "protocol_version" field in the General capability structure,
so that client code can check the version and report an error if they
need to.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This allows to simplify some user code, and let us introduce a
"protocol_version" field in the next patch without having to explicitly
set its value but rely on the default instead.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
- Add a new `UnsupportedPdu` kind to `PduError`, enhancing error handling capabilities in ironrdp-pdu.
This new error kind allows for more specific error messages when encountering unsupported PDUs.
- Implement a macro `unsupported_pdu_err` for conveniently creating `PduError` instances with the `UnsupportedPdu` kind.
- Implement handling for `ServerDriveLockControlRequest` in ironrdp-rdpdr, including the definition of
the struct and its decoding method. This adds support for processing lock control requests in the RDPDR protocol.
- Update `Rdpdr`'s `process` method to utilize the new `unsupported_pdu_err` when encountering unknown packet IDs, replacing the previous handling of unimplemented PDUs.
- Remove the `Unimplemented` variant from `RdpdrPdu` and `Component` enums, replacing it with `EmptyResponse` in `RdpdrPdu`.
This change streamlines the handling of unimplemented or unexpected PDUs.
- Enhance `FileInformationClass` and `FileInformationClassLevel` with `Display` implementations, providing better logging and error message capabilities.
- Extend ReadCursor with methods to read and try reading i64 values in both little and big endian formats.
- Update RdpdrPdu to handle ClientDriveSetInformationResponse, reflecting the addition of ServerDriveSetInformationRequest handling in the RDPDR (Remote Desktop Protocol: Device Redirection) protocol.
- Implement decoding and encoding of various FileInformationClass types such as FileEndOfFileInformation, FileDispositionInformation, FileRenameInformation, and FileAllocationInformation.
- Refactor the existing code to improve the handling of different FileInformationClassLevels and FileSystemInformationClassLevels.
- Add handling for ServerDriveNotifyChangeDirectoryRequest in ServerDriveIoRequest, supporting the specific case when MinorFunction is set to IRP_MN_NOTIFY_CHANGE_DIRECTORY.
- Added DeviceWriteRequest and DeviceWriteResponse support in RDPDR.
- Included handling for new write requests and responses in ServerDriveIoRequest.
- Updated RdpdrPdu to manage DeviceWriteResponse alongside read and other responses.
- Enhanced processing logic to handle unexpected packets for device write actions.
- Implemented `DeviceReadRequest` and `DeviceReadResponse` PDUs in `ironrdp-rdpdr`.
- Updated `RdpdrPdu` enum to include `DeviceReadResponse`.
- Modified decoding logic in `ServerDriveIoRequest` to handle `MajorFunction::Read`.
- Streamlined error handling for unexpected packets in `StaticVirtualChannelProcessor`.
- Refactored `ensure_size` checks to `ensure_fixed_part_size` in `efs.rs` for improved consistency.
- Introduced `AnyIoCtlCode` to handle cases with unknown or non-critical IoCtlCode.
- Updated `DeviceControlResponse` to accept an optional `output_buffer`, aligning with FreeRDP's implementation for empty buffer scenarios.
- Implemented decoding for `DeviceControlRequest<AnyIoCtlCode>` in `ServerDriveIoRequest`.
- Added support for ServerDriveQueryVolumeInformationRequest in the RDPDR EFS module.
- Implemented decoding logic for ServerDriveQueryVolumeInformationRequest with checks for valid FileSystemInformationClassLevels.
- Extended the RdpdrPdu enum to include ClientDriveQueryVolumeInformationResponse.
- Implemented ClientDriveQueryVolumeInformationResponse with appropriate encoding and sizing methods.
- Updated Rdpdr handling to accommodate the new ClientDriveQueryVolumeInformationResponse type.
Adds support for native cursors for `IronRDP-web`.
- Uses CSS `cursor` property to set the custom cursor (which we encode as Base64 data URL
- Software rendering is still in place and could be enabled via the config flag
- "Inverted colors" are implemented for native cursors as a "checkerboard pattern" (As in FreeRDP)
- Native cursors have size **limitation** - _Any remote cursor bigger than 32x32 will be scaled down._ This is due to browser limitations described [here](https://chromestatus.com/feature/5825971391299584) and [here](https://bugs.chromium.org/p/chromium/issues/detail?id=880863)
Closes#250
- Added a new method write_i8 to WriteCursor in ironrdp-pdu/src/cursor.rs,
allowing for writing an 8-bit integer value to the cursor.
- Updated Rdpdr in ironrdp-rdpdr/src/lib.rs to handle an additional case
for ClientDriveQueryDirectoryResponse in the error handling logic.
- Introduced several new structures in ironrdp-rdpdr/src/pdu/efs.rs related
to directory information, including FileBothDirectoryInformation,
FileFullDirectoryInformation, FileNamesInformation, and
FileDirectoryInformation.
- Added support for the ClientDriveQueryDirectoryResponse PDU in various
parts of ironrdp-rdpdr, including the RdpdrPdu enum and its implementation.
- Added a ServerDriveQueryDirectoryRequest structure to handle server
requests for querying directory information, along with the necessary
encoding logic.
- Added a ClientDriveQueryDirectoryResponse structure to handle client
responses for directory queries, along with the necessary encoding logic.
- Updated the RDPDR PDU encoding and size calculation methods to support
the new ClientDriveQueryDirectoryResponse structure.