summaryrefslogtreecommitdiffstats
path: root/src/bytearray.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-04-16 16:06:11 +0200
committerGravatar Nikias Bassen2023-04-16 16:06:11 +0200
commit3aa5f6a3a663a5f2694ec6fc8cdf9744b616e15e (patch)
tree9b071b9f041f80ab36a240b226af642cc0c19031 /src/bytearray.h
parentbfc97788f081584ced9cd35d85b69b3fec6b907c (diff)
downloadlibplist-3aa5f6a3a663a5f2694ec6fc8cdf9744b616e15e.tar.gz
libplist-3aa5f6a3a663a5f2694ec6fc8cdf9744b616e15e.tar.bz2
Add new output-only formats and Define constants for the different plist formats
This commit introduces constants for the different plist formats, and adds 3 new human-readable output-only formats: - PLIST_FORMAT_PRINT: the default human-readable format - PLIST_FORMAT_LIMD: "libimobiledevice" format (used in ideviceinfo) - PLIST_FORMAT_PLUTIL: plutil-style format Also, a new set of write functions has been added: - plist_write_to_string - plist_write_to_stream - plist_write_to_file Plus a simple "dump" function: - plist_print See documentation for details.
Diffstat (limited to 'src/bytearray.h')
-rw-r--r--src/bytearray.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bytearray.h b/src/bytearray.h
index 312e2aa..b53e006 100644
--- a/src/bytearray.h
+++ b/src/bytearray.h
@@ -21,14 +21,17 @@
#ifndef BYTEARRAY_H
#define BYTEARRAY_H
#include <stdlib.h>
+#include <stdio.h>
typedef struct bytearray_t {
void *data;
size_t len;
size_t capacity;
+ FILE *stream;
} bytearray_t;
bytearray_t *byte_array_new(size_t initial);
+bytearray_t *byte_array_new_for_stream(FILE *stream);
void byte_array_free(bytearray_t *ba);
void byte_array_grow(bytearray_t *ba, size_t amount);
void byte_array_append(bytearray_t *ba, void *buf, size_t len);