summaryrefslogtreecommitdiffstats
path: root/src/utils.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-12-13 04:35:44 +0100
committerGravatar Nikias Bassen2013-12-13 04:35:44 +0100
commitc168c3c7746e51fef4ec748a3982553833bb0c4e (patch)
tree927567acde881f84bdd3b40caf7dd095952423ad /src/utils.h
parent3537f78a98111b88aab5e2d94dda340cf09be5af (diff)
downloadusbmuxd-c168c3c7746e51fef4ec748a3982553833bb0c4e.tar.gz
usbmuxd-c168c3c7746e51fef4ec748a3982553833bb0c4e.tar.bz2
add support for reading and writing config and pair record files
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 69a4259..730fbad 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -24,6 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#define __UTILS_H__
#include <poll.h>
+#include <plist/plist.h>
enum fdowner {
FD_LISTEN,
@@ -69,4 +70,20 @@ void collection_free(struct collection *col);
} \
} while(0);
+#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