aboutsummaryrefslogtreecommitdiff
path: root/vnc.h
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-05-03 14:31:34 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-05-03 12:09:47 -0500
commit70a4568fe0c5a64adaa3da5030b7109e5199e692 (patch)
tree2db99d7e74ce21b01f3f46bcf695a2e330ec4488 /vnc.h
parentbc47d201d6868a6ad51a5d2f7f946d0e6b33c5ab (diff)
vnc: split encoding in specific files
This will allow to implement new encodings (tight, zrle, ..) in a cleaner way. This may hurt performances, because some functions like vnc_convert_pixel are not static anymore, but should not be a problem with gcc 4.5 and the new -flto. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vnc.h')
-rw-r--r--vnc.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/vnc.h b/vnc.h
index b593608066..1aa71b0085 100644
--- a/vnc.h
+++ b/vnc.h
@@ -132,8 +132,6 @@ struct VncState
int last_y;
uint32_t vnc_encoding;
- uint8_t tight_quality;
- uint8_t tight_compression;
int major;
int minor;
@@ -152,7 +150,6 @@ struct VncState
Buffer input;
/* current output mode information */
VncWritePixels *write_pixels;
- VncSendHextileTile *send_hextile_tile;
DisplaySurface clientds;
CaptureVoiceOut *audio_cap;
@@ -164,6 +161,16 @@ struct VncState
uint8_t modifiers_state[256];
QEMUPutLEDEntry *led;
+ /* Encoding specific */
+
+ /* Tight */
+ uint8_t tight_quality;
+ uint8_t tight_compression;
+
+ /* Hextile */
+ VncSendHextileTile *send_hextile_tile;
+
+ /* Zlib */
Buffer zlib;
Buffer zlib_tmp;
z_stream zlib_stream[4];
@@ -376,4 +383,20 @@ void buffer_append(Buffer *buffer, const void *data, size_t len);
char *vnc_socket_local_addr(const char *format, int fd);
char *vnc_socket_remote_addr(const char *format, int fd);
+/* Framebuffer */
+void vnc_framebuffer_update(VncState *vs, int x, int y, int w, int h,
+ int32_t encoding);
+
+void vnc_convert_pixel(VncState *vs, uint8_t *buf, uint32_t v);
+
+/* Encodings */
+void vnc_raw_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
+
+void vnc_hextile_send_framebuffer_update(VncState *vs, int x,
+ int y, int w, int h);
+void vnc_hextile_set_pixel_conversion(VncState *vs, int generic);
+
+void vnc_zlib_init(VncState *vs);
+void vnc_zlib_send_framebuffer_update(VncState *vs, int x, int y, int w, int h);
+
#endif /* __QEMU_VNC_H */