Commit Graph

27 Commits

Author SHA1 Message Date
Hans de Goede
bc9f00961f Respond to clipb request with an unsupported type with data with a none type
Currently we send a VD_AGENT_CLIPBOARD_RELEASE when we receive a
VD_AGENT_CLIPBOARD_REQUEST with a type which we do not support. This is not
correct, as this means given up clipboard ownership while we may be able
to answer requests with different types. The correct response is to
nack the request by sending a VD_AGENT_CLIPBOARD (data) message with a type
of VD_AGENT_CLIPBOARD_NONE.
2010-10-01 20:14:16 +02:00
Hans de Goede
a2d645ffe3 Change VD_AGENT_CLIPBOARD_GRAB to an array of types
A clipboard owner can indicate that it can supply the data the clipboard
owns in multiple formats, so make the data passed with a
VD_AGENT_CLIPBOARD_GRAB message an array of types rather then a single
type.
2010-10-01 20:01:47 +02:00
Arnon Gilboa
c909198eca client: support clipboard/selection-owner model (v2)
-includes most of Hans' review fixes (up to the SelectionRequest comment [4]) & X11 wips sent by Hans (10x!)
-use the VD_AGENT_CLIPBOARD_* types in the platform code
-add ifs for VD_AGENT_CAP_CLIPBOARD_BY_DEMAND in both sides
-support the GRAB/REQUEST/DATA/RELEASE verbs in both ways
-pasting clipboard data is now "only-by-demand" from both sides (client and agent), whose behavior is symmetric
-client and agent don't read or send the contents of the clipboard unnecessarily (e.g. copy, internal paste, repeating paste, focus change)
-set client as clipboard listener instead of application
-add atexit(cleanup) in win platform

linux:
-instead of clipboard atom selection instead of XA_PRIMARY
-enable USE_XRANDR_1_2 and support clipboard in MultyMonScreen
-send utf8 with no null termination, remove ++size
-add xfixes in configure.ac & Makefile.am

windows:
-bonus: support image cut & paste, currently only on windows

not done yet:
-clipboards formats are still uint32_t, not mime types stores as strings
-platform_win is still used, not the root window
-not replaced the ugly windows CF_DIB in agent/winclient
2010-10-01 16:06:10 +02:00
Alon Levy
c47def6e48 client: add default agent capabilities 2010-08-31 14:30:00 +03:00
Alon Levy
18466b8b55 client: add announce_capabilities 2010-08-31 11:08:09 +03:00
Yonit Halperin
7b7feaecdf client: Fix for clipboard sending; It wasn't thread safe. 2010-08-23 08:19:26 +03:00
Alexander Larsson
12b08f2c3e codegen: Various cleanups
Remove all uses of @end in the marshaller, instead just using
the C struct array-at-end-of-struct. To make this work we also remove
all use of @end for switches (making them C unions).

We drop the zero member of the notify message so that we can avoid this
use of @end for a primitive in the marshaller (plus its useless to send
over the wire).

We change the offsets and stuff in the migration messages to real pointers.
2010-07-19 16:28:22 +02:00
Arnon Gilboa
ce03f5449d client: add clipboard support
* windows - untested
 * linux - small strings both ways, large implemented differently:
  * client to guest - support INCR
  * guest to client - we supply a single possibly very large property
 * requires server changes in next patch to work with spice-vmc
2010-07-19 10:30:19 +03:00
Yonit Halperin
9877e7ae84 client: command line arguments for setting windows guest monitors'
color depth and disabling some display options (helpful on WAN)
2010-07-19 09:40:11 +03:00
Alexander Larsson
eb3fe11d94 Fix version mismatch error on connect
Protocol is 0 (auto), 1 (old), or 2 (new). This is (apart from 0) the
same as the major number for the stable protocol. However, the current major
is ~(-1) to signify it being unstable, so don't use the major number as source
for setting or comparing protocol.
2010-06-23 12:18:41 +02:00
Alexander Larsson
72cf104c28 client: Support connecting to a major==1 server 2010-06-22 17:34:45 +02:00
Alexander Larsson
5c05a24ba1 Convert client to use indirect calls for message marshalling
This is required to support multiple versions
2010-06-22 10:54:59 +02:00
Alexander Larsson
ee91ed475d Switch client to use generated marshallers 2010-06-18 20:27:32 +02:00
Alexander Larsson
4154d70289 Client: Use the autogenerated demarshallers
When a message has been read from the network we now pass it into
the generated demarshaller for the channel. The demarshaller converts
the network data to in-memory structures that is passed on to the
spice internals.

Additionally it also:
* Converts endianness
* Validates sizes of message and any pointers in it
* Localizes offsets (converts them to pointers)
* Checks for zero offsets in messages where they are not supported

Some of this was previously done using custom code in the client, this
is now removed.
2010-06-18 16:32:11 +02:00
Alexander Larsson
c97116aeb9 Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
Yonit Halperin
88aa56045a client: handling SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST
disconnecting from the current host and connecting to the target host.
2010-04-06 14:56:46 +02:00
Yonit Halperin
457693fcfa client: add command line support for ciphers, ca file, and host certificate subject 2010-03-18 10:21:47 +01:00
Alexander Larsson
1f51697852 Rename symbols that were changed in spice-protocol
This is an automatic change using:
$ find -name "*.[ch]" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
$ find -name "*.cpp" | xargs ../spice-protocol/rename-identifiers.sh ../spice-protocol/renames
2010-02-04 18:49:00 +01:00
Yonit Halperin
3eae1c80d9 server,client: server authentication for secured channels.
3 available mechanisms:  by public key, by host name, and by certificate subject name.
In the former method, chain of trust verification is not performed.
The CA certificate files are looked for under <spice-config-dir>/spice_truststore.pem

windows <spice-config-dir>=%APPDATA%\spicec\
linux <spice-config-dir>=$HOME/.spicec/
2010-01-11 19:10:54 +02:00
Yaniv Kamay
68fb440129 client: add GUI infrastructure + functional login dialog 2009-12-28 12:38:58 +02:00
Yaniv Kamay
2dbaf8c00c client: smiplify DisconnectedEvent 2009-12-28 12:36:46 +02:00
Yaniv Kamay
c6435ea02b client: wait for disconnect state in RedClient::connect() 2009-12-28 12:35:54 +02:00
Yaniv Kamay
3b51087b36 client: interactive screen layer 2009-11-30 18:03:35 +02:00
Yonit Halperin
2e4d709805 spice client: fixed missing AutoRef 2009-11-09 19:48:52 +02:00
Yonit Halperin
ec34856fea spice client: remove timer interface from platform - use Application (via ProcessLoop interface). 2009-11-09 19:06:44 +02:00
Yonit Halperin
8d5b738ba1 spice client: creating a general process loop.
The process loop is responsible for: 1) waiting for events 2) timers 3) events queue for
actions that should be performed in the context of the thread and are pushed from other threads.
The benefits:
1) remove duplicity: till now, there was one implementaion of events loop for the channels and
another one for the main thread.
2) timers can be executed on each thread and not only on the main thread.
3) events can be pushed to each thread and not only to the main thread.
In this commit, only the main thread was modified to use the new process loop.
2009-11-09 14:39:33 +02:00
Yaniv Kamay
c1b79eb035 fresh start 2009-10-14 15:06:41 +02:00