summaryrefslogtreecommitdiffstats
path: root/common/mem.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-07-08 14:17:24 +0200
committerAlexander Larsson <alexl@redhat.com>2010-07-08 14:17:24 +0200
commit1d64d398447de90e12da7f6afacc05f07fa03b22 (patch)
treef800a6c9ff2fcdc9151087a3705400a3053ade9a /common/mem.h
parent0659fb78972b5e9d0dc90a0270ef1dd4b59042ec (diff)
downloadspice-1d64d398447de90e12da7f6afacc05f07fa03b22.tar.gz
spice-1d64d398447de90e12da7f6afacc05f07fa03b22.tar.xz
spice-1d64d398447de90e12da7f6afacc05f07fa03b22.zip
Move SpiceChunks to mem.h
Diffstat (limited to 'common/mem.h')
-rw-r--r--common/mem.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/common/mem.h b/common/mem.h
index 385ef556..5f0eb25e 100644
--- a/common/mem.h
+++ b/common/mem.h
@@ -21,7 +21,23 @@
#include <stdlib.h>
#include <spice/macros.h>
-#include <common/draw.h> /* for SpiceChunks, temporary */
+
+typedef struct SpiceChunk {
+ uint8_t *data;
+ uint32_t len;
+} SpiceChunk;
+
+enum {
+ SPICE_CHUNKS_FLAGS_UNSTABLE = (1<<0),
+ SPICE_CHUNKS_FLAGS_FREE = (1<<1)
+};
+
+typedef struct SpiceChunks {
+ uint32_t data_size;
+ uint32_t num_chunks;
+ uint32_t flags;
+ SpiceChunk chunk[0];
+} SpiceChunks;
char *spice_strdup(const char *str) SPICE_GNUC_MALLOC;
char *spice_strndup(const char *str, size_t n_bytes) SPICE_GNUC_MALLOC;