summaryrefslogtreecommitdiffstats
path: root/server/red_worker.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-09-03 00:21:55 +0200
committerFrediano Ziglio <fziglio@redhat.com>2015-10-23 16:32:47 +0100
commitf99fac0f42d25d8f34104dd0ff11dcf93cd7bf7e (patch)
tree659a658f78aa65f44366a2a2dfca3bae0d46e315 /server/red_worker.h
parentb9defad7d9a774d50c8f8497f41e82f0d563597b (diff)
downloadspice-f99fac0f42d25d8f34104dd0ff11dcf93cd7bf7e.tar.gz
spice-f99fac0f42d25d8f34104dd0ff11dcf93cd7bf7e.tar.xz
spice-f99fac0f42d25d8f34104dd0ff11dcf93cd7bf7e.zip
server: start separate display/cursor channel headers
Just move some declarations around Acked-by: Frediano Ziglio <fziglio@redhat.com>
Diffstat (limited to 'server/red_worker.h')
-rw-r--r--server/red_worker.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/red_worker.h b/server/red_worker.h
index c935e0a7..7732e390 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -58,6 +58,26 @@ typedef struct WorkerInitData {
RedDispatcher *red_dispatcher;
} WorkerInitData;
+typedef struct CommonChannelClient {
+ RedChannelClient base;
+ uint32_t id;
+ struct RedWorker *worker;
+ int is_low_bandwidth;
+} CommonChannelClient;
+
+#define CHANNEL_RECEIVE_BUF_SIZE 1024
+typedef struct CommonChannel {
+ RedChannel base; // Must be the first thing
+ struct RedWorker *worker;
+ uint8_t recv_buf[CHANNEL_RECEIVE_BUF_SIZE];
+ uint32_t id_alloc; // bitfield. TODO - use this instead of shift scheme.
+ int during_target_migrate; /* TRUE when the client that is associated with the channel
+ is during migration. Turned off when the vm is started.
+ The flag is used to avoid sending messages that are artifacts
+ of the transition from stopped vm to loaded vm (e.g., recreation
+ of the primary surface) */
+} CommonChannel;
+
RedWorker* red_worker_new(WorkerInitData *init_data);
bool red_worker_run(RedWorker *worker);