diff options
Diffstat (limited to 'common/utils.h')
-rw-r--r-- | common/utils.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/common/utils.h b/common/utils.h index 441d188..8394272 100644 --- a/common/utils.h +++ b/common/utils.h @@ -22,9 +22,27 @@ #ifndef __UTILS_H #define __UTILS_H +#ifdef WIN32 +#include <windows.h> +#endif + +#include <stdio.h> +#include <plist/plist.h> + #ifndef HAVE_STPCPY char *stpcpy(char * s1, const char * s2); #endif char *string_concat(const char *str, ...); +void buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length); +void buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length); + +enum plist_format_t { + PLIST_FORMAT_XML, + PLIST_FORMAT_BINARY +}; + +int plist_read_from_filename(plist_t *plist, const char *filename); +int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format); + #endif |