summaryrefslogtreecommitdiff
path: root/server/spice.h
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2012-08-23 22:04:24 -0400
committerSøren Sandmann Pedersen <ssp@redhat.com>2012-09-06 13:04:11 -0400
commit83b3e3f20dbd7c87e2d7cace68d99138c09ed6ab (patch)
treea8c812250847043c0102991683788e8291a3a698 /server/spice.h
parent9e9432c0233ff2e62170543634e5b2419891c0da (diff)
Add new set_client_capabilities() interface to QXLInstance
A new interface set_client_capabilities (QXLInstance *qin, uint8_t client_present, uint8_t caps[58]); is added to QXLInstance, and spice server is changed to call it whenever a client connects or disconnects. The QXL device in response is expected to update the client capability bits in the ROM of the device and raise the QXL_INTERRUPT_CLIENT interrupt. There is a potential race condition in the case where a client disconnects and a new client with fewer capabilities connects. There may be commands in the ring that the new client can't handle. This case is handled by first changing the capability bits, then processing all commands in the ring, and then start forwarding commands to the new client. As long as the guest obeys the capability bits, the new client will never see anything it doesn't understand.
Diffstat (limited to 'server/spice.h')
-rw-r--r--server/spice.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/spice.h b/server/spice.h
index fdcfbb76..61144076 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -239,6 +239,9 @@ struct QXLInterface {
void (*update_area_complete)(QXLInstance *qin, uint32_t surface_id,
struct QXLRect *updated_rects,
uint32_t num_updated_rects);
+ void (*set_client_capabilities)(QXLInstance *qin,
+ uint8_t client_present,
+ uint8_t caps[58]);
};
struct QXLInstance {