diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-07-08 14:17:24 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:48 +0100 |
commit | 69c1444add928496813e048fabb50589e8d3120f (patch) | |
tree | 488fec94f245f64e322b1f97ce9e247c36139d75 /common/mem.h | |
parent | c471990a9f3aba734d87c9835449b24607e07f55 (diff) | |
download | spice-common-69c1444add928496813e048fabb50589e8d3120f.tar.gz spice-common-69c1444add928496813e048fabb50589e8d3120f.tar.xz spice-common-69c1444add928496813e048fabb50589e8d3120f.zip |
Move SpiceChunks to mem.h
Diffstat (limited to 'common/mem.h')
-rw-r--r-- | common/mem.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/common/mem.h b/common/mem.h index 385ef55..5f0eb25 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; |