summaryrefslogtreecommitdiff
path: root/src/import/import-compress.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-03-09 17:55:07 +0100
committerLennart Poettering <lennart@poettering.net>2015-03-09 18:02:23 +0100
commit587fec427c80b6c34dcf1d7570f891fcb652a7c5 (patch)
tree0b8f6e748ac8ecc34cbe6d03327532fb52a0e85b /src/import/import-compress.h
parentea79e73b8a8fa72fb959a0604f642f97e200a803 (diff)
importd: add API for exporting container/VM images
Also, expose it in machinectl.
Diffstat (limited to 'src/import/import-compress.h')
-rw-r--r--src/import/import-compress.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/import/import-compress.h b/src/import/import-compress.h
index 4f97f20b45..50d91f732c 100644
--- a/src/import/import-compress.h
+++ b/src/import/import-compress.h
@@ -41,7 +41,7 @@ typedef enum ImportCompressType {
typedef struct ImportCompress {
ImportCompressType type;
-
+ bool encoding;
union {
lzma_stream xz;
z_stream gzip;
@@ -54,8 +54,11 @@ typedef int (*ImportCompressCallback)(const void *data, size_t size, void *userd
void import_compress_free(ImportCompress *c);
int import_uncompress_detect(ImportCompress *c, const void *data, size_t size);
-
int import_uncompress(ImportCompress *c, const void *data, size_t size, ImportCompressCallback callback, void *userdata);
+int import_compress_init(ImportCompress *c, ImportCompressType t);
+int import_compress(ImportCompress *c, const void *data, size_t size, void **buffer, size_t *buffer_size, size_t *buffer_allocated);
+int import_compress_finish(ImportCompress *c, void **buffer, size_t *buffer_size, size_t *buffer_allocated);
+
const char* import_compress_type_to_string(ImportCompressType t) _const_;
ImportCompressType import_compress_type_from_string(const char *s) _pure_;