diff options
Diffstat (limited to 'src/plist.h')
| -rw-r--r-- | src/plist.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plist.h b/src/plist.h index 98c7d91..5f31281 100644 --- a/src/plist.h +++ b/src/plist.h | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
| 32 | #include <unistd.h> | 32 | #include <unistd.h> |
| 33 | 33 | ||
| 34 | char *format_string(const char *buf, int cols, int depth); | ||
| 34 | xmlNode *add_key_dict_node(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); | 35 | xmlNode *add_key_dict_node(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); |
| 35 | xmlNode *add_key_str_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); | 36 | xmlNode *add_key_str_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); |
| 36 | xmlNode *add_key_data_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); | 37 | xmlNode *add_key_data_dict_element(xmlDocPtr plist, xmlNode * dict, const char *key, const char *value, int depth); |
| @@ -47,7 +48,7 @@ void free_dictionary(char **dictionary); | |||
| 47 | enum { | 48 | enum { |
| 48 | BPLIST_TRUE = 0x08, | 49 | BPLIST_TRUE = 0x08, |
| 49 | BPLIST_FALSE = 0x09, | 50 | BPLIST_FALSE = 0x09, |
| 50 | BPLIST_FILL = 0x0F, /* will be used for length grabbing */ | 51 | BPLIST_FILL = 0x0F, /* will be used for length grabbing */ |
| 51 | BPLIST_INT = 0x10, | 52 | BPLIST_INT = 0x10, |
| 52 | BPLIST_REAL = 0x20, | 53 | BPLIST_REAL = 0x20, |
| 53 | BPLIST_DATE = 0x33, | 54 | BPLIST_DATE = 0x33, |
| @@ -62,15 +63,17 @@ enum { | |||
| 62 | }; | 63 | }; |
| 63 | 64 | ||
| 64 | typedef struct _bplist_node { | 65 | typedef struct _bplist_node { |
| 65 | struct _bplist_node *next, **subnodes; // subnodes is for arrays, dicts and (potentially) sets. | 66 | struct _bplist_node *next, **subnodes; // subnodes is for arrays, dicts and (potentially) sets. |
| 66 | uint64_t length, intval64; | 67 | uint64_t length, intval64; |
| 67 | uint32_t intval32; // length = subnodes | 68 | uint32_t intval32; // length = subnodes |
| 68 | uint16_t intval16; | 69 | uint16_t intval16; |
| 69 | uint8_t intval8; | 70 | uint8_t intval8; |
| 70 | uint8_t type, *indexes; // indexes for array-types; essentially specify the order in which to access for key => value pairs | 71 | uint8_t type, *indexes; // indexes for array-types; essentially specify the order in which to access for key => value pairs |
| 71 | char *strval; | 72 | char *strval; |
| 72 | double realval; | 73 | double realval; |
| 73 | wchar_t *unicodeval; | 74 | wchar_t *unicodeval; |
| 74 | } bplist_node; | 75 | } bplist_node; |
| 75 | 76 | ||
| 77 | bplist_node *parse_nodes(const char *bpbuffer, uint32_t bplength, uint32_t * position); | ||
| 78 | |||
| 76 | #endif | 79 | #endif |
