diff options
Diffstat (limited to 'src/utils.h')
| -rw-r--r-- | src/utils.h | 17 |
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 | |||
| 24 | #define __UTILS_H__ | 24 | #define __UTILS_H__ |
| 25 | 25 | ||
| 26 | #include <poll.h> | 26 | #include <poll.h> |
| 27 | #include <plist/plist.h> | ||
| 27 | 28 | ||
| 28 | enum fdowner { | 29 | enum fdowner { |
| 29 | FD_LISTEN, | 30 | FD_LISTEN, |
| @@ -69,4 +70,20 @@ void collection_free(struct collection *col); | |||
| 69 | } \ | 70 | } \ |
| 70 | } while(0); | 71 | } while(0); |
| 71 | 72 | ||
| 73 | #ifndef HAVE_STPCPY | ||
| 74 | char *stpcpy(char * s1, const char * s2); | ||
| 75 | #endif | ||
| 76 | char *string_concat(const char *str, ...); | ||
| 77 | |||
| 78 | void buffer_read_from_filename(const char *filename, char **buffer, uint64_t *length); | ||
| 79 | void buffer_write_to_filename(const char *filename, const char *buffer, uint64_t length); | ||
| 80 | |||
| 81 | enum plist_format_t { | ||
| 82 | PLIST_FORMAT_XML, | ||
| 83 | PLIST_FORMAT_BINARY | ||
| 84 | }; | ||
| 85 | |||
| 86 | int plist_read_from_filename(plist_t *plist, const char *filename); | ||
| 87 | int plist_write_to_filename(plist_t plist, const char *filename, enum plist_format_t format); | ||
| 88 | |||
| 72 | #endif | 89 | #endif |
