spice-protocol/spice
Hans de Goede 7be0e88e7e vd_agent: Add caps for the agent to signal the guest line-ending (rhbz#752350)
When copy and pasting between a Linux guest and a Windows client or visa
versa, the line-endings of the text will usually be wrong for the other side,
so it is desirable to do automatic conversion.

However sometimes it is possible for text in the clipboard on Linux to have
MSDOS (CRLF) style line-endings, when copy and pasting from Linux to Linux
it is undesirable to automatically convert these, since this would not happen
when the apps were running directly on the same machine.

So we want to do automatic conversion only if the client and guest native
line-endings differ. This means that we cannot simply define one standard
line-ending for VD_AGENT_CLIPBOARD_UTF8_TEXT data.

Given the above it makes sense to only do conversion on one end. This
patch adds new capabilities which allow the guest-agent to advertise what
is the native line-ending of the guest.

This should be used by the client in the following way:
1) Check if the guest-agent advertises any line-ending type at all, if not
the guest line-ending is unknown -> do not convert
2) If the guest's native line-ending matches that of the platform the client
is running on, then do no not convert
3) If the guest's native line-ending is different from the client platform,
then convert received clipboard data into the client platform's native
line-ending, and convert clipboard data which will be send to the guest-agent
into the guest's native line-ending.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-06-05 14:23:52 +02:00
..
barrier.h define spice_mb MemoryBarrier for WIN64 2011-02-02 11:34:19 +02:00
controller_prot.h controller: add proxy message 2013-01-28 14:29:15 +01:00
end-packed.h mingw32: specify packing alignment to 1 byte, to override -mms-bitfield 2010-12-29 16:13:55 +01:00
enums.h add SPICE_MSG_PLAYBACK_LATENCY 2013-04-22 11:30:49 -04:00
error_codes.h Clean up and standardize header guards 2010-02-04 16:47:14 +01:00
foreign_menu_prot.h build: include spice/types.h in foreign_menu_prot.h 2012-02-23 22:18:34 +01:00
ipc_ring.h Fix up SPICE_SPICE typo 2010-02-04 18:10:50 +01:00
macros.h macros: define INLINE 2011-05-12 11:45:58 +03:00
Makefile.am Add QXL_ESCAPE_SET_CUSTOM_DISPLAY 2012-05-11 18:19:25 +02:00
protocol.h add SPICE_MSG_PLAYBACK_LATENCY 2013-04-22 11:30:49 -04:00
qxl_dev.h qxl_dev.h: add client monitors configuration notification to guest 2012-09-12 16:54:08 +03:00
qxl_windows.h Add QXL_ESCAPE_SET_CUSTOM_DISPLAY 2012-05-11 18:19:25 +02:00
start-packed.h mingw32: specify packing alignment to 1 byte, to override -mms-bitfield 2010-12-29 16:13:55 +01:00
stats.h Fix SPICE_STAT_SHM_NAME to be portable 2012-01-08 13:44:20 +02:00
types.h Add byteswapping macros 2010-05-19 16:02:40 +02:00
vd_agent.h vd_agent: Add caps for the agent to signal the guest line-ending (rhbz#752350) 2013-06-05 14:23:52 +02:00
vdi_dev.h Always include using <spice/foo.h> style 2010-02-04 16:47:23 +01:00