summaryrefslogtreecommitdiffstats
path: root/channels/rail/rail_common.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
commit827a4c3faa27e0c186452585b15094eee1119085 (patch)
treee6a08b0c767863d66f7d4a9de80db5edc7db29be /channels/rail/rail_common.c
parentReleasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz
freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--channels/rail/rail_common.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/channels/rail/rail_common.c b/channels/rail/rail_common.c
index fb6bc80..6deb968 100644
--- a/channels/rail/rail_common.c
+++ b/channels/rail/rail_common.c
@@ -589,3 +589,31 @@ BOOL rail_is_extended_spi_supported(UINT32 channelFlags)
{
return (channelFlags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_EXTENDED_SPI_SUPPORTED) ? TRUE : FALSE;
}
+
+const char* rail_handshake_ex_flags_to_string(UINT32 flags, char* buffer, size_t len)
+{
+ if (len < 1)
+ return NULL;
+
+ _snprintf(buffer, len, "{");
+ char* fbuffer = &buffer[1];
+ len--;
+
+ if (flags & TS_RAIL_ORDER_HANDSHAKEEX_FLAGS_HIDEF)
+ winpr_str_append("HIDEF", fbuffer, len, "|");
+ if (flags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_EXTENDED_SPI_SUPPORTED)
+ winpr_str_append("EXTENDED_SPI_SUPPORTED", fbuffer, len, "|");
+ if (flags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_SNAP_ARRANGE_SUPPORTED)
+ winpr_str_append("SNAP_ARRANGE_SUPPORTED", fbuffer, len, "|");
+ if (flags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_TEXT_SCALE_SUPPORTED)
+ winpr_str_append("TEXT_SCALE_SUPPORTED", fbuffer, len, "|");
+ if (flags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_CARET_BLINK_SUPPORTED)
+ winpr_str_append("CARET_BLINK_SUPPORTED", fbuffer, len, "|");
+ if (flags & TS_RAIL_ORDER_HANDSHAKE_EX_FLAGS_EXTENDED_SPI_2_SUPPORTED)
+ winpr_str_append("EXTENDED_SPI_2_SUPPORTED", fbuffer, len, "|");
+
+ char number[16] = { 0 };
+ _snprintf(number, sizeof(number), "[0x%08" PRIx32 "]", flags);
+ winpr_str_append(number, buffer, len, "}");
+ return buffer;
+}