summary refs log tree commit diff stats
path: root/ui/vnc.h
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-07-07 20:57:59 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-07-26 17:36:14 -0500
commitd1af0e056a5a3681dc82a2e715bb292c6d300def (patch)
treeb03d5a92a61694920d527bcd1763bbd3574ff28f /ui/vnc.h
parent5136a0526989fdfd8799ae4e29ff43d5b80ee37e (diff)
downloadfocaccia-qemu-d1af0e056a5a3681dc82a2e715bb292c6d300def.tar.gz
focaccia-qemu-d1af0e056a5a3681dc82a2e715bb292c6d300def.zip
vnc: encapsulate encoding members
This will allow to implement the threaded VNC server in a
more cleaner way.

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui/vnc.h')
-rw-r--r--ui/vnc.h59
1 files changed, 33 insertions, 26 deletions
diff --git a/ui/vnc.h b/ui/vnc.h
index 3b8b91122a..344a68644b 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -122,6 +122,36 @@ struct VncDisplay
 #endif
 };
 
+typedef struct VncTight {
+    int type;
+    uint8_t quality;
+    uint8_t compression;
+    uint8_t pixel24;
+    Buffer tight;
+    Buffer tmp;
+    Buffer zlib;
+    Buffer gradient;
+#ifdef CONFIG_VNC_JPEG
+    Buffer jpeg;
+#endif
+#ifdef CONFIG_VNC_PNG
+    Buffer png;
+#endif
+    int levels[4];
+    z_stream stream[4];
+} VncTight;
+
+typedef struct VncHextile {
+    VncSendHextileTile *send_tile;
+} VncHextile;
+
+typedef struct VncZlib {
+    Buffer zlib;
+    Buffer tmp;
+    z_stream stream;
+    int level;
+} VncZlib;
+
 struct VncState
 {
     int csock;
@@ -170,33 +200,10 @@ struct VncState
     QEMUPutLEDEntry *led;
 
     /* Encoding specific */
+    VncTight tight;
+    VncZlib zlib;
+    VncHextile hextile;
 
-    /* Tight */
-    int tight_type;
-    uint8_t tight_quality;
-    uint8_t tight_compression;
-    uint8_t tight_pixel24;
-    Buffer tight;
-    Buffer tight_tmp;
-    Buffer tight_zlib;
-    Buffer tight_gradient;
-#ifdef CONFIG_VNC_JPEG
-    Buffer tight_jpeg;
-#endif
-#ifdef CONFIG_VNC_PNG
-    Buffer tight_png;
-#endif
-    int tight_levels[4];
-    z_stream tight_stream[4];
-
-    /* Hextile */
-    VncSendHextileTile *send_hextile_tile;
-
-    /* Zlib */
-    Buffer zlib;
-    Buffer zlib_tmp;
-    z_stream zlib_stream;
-    int zlib_level;
 
     Notifier mouse_mode_notifier;