diff options
author | Christophe Fergeau | 2016-05-12 02:55:01 +0200 |
---|---|---|
committer | Nikias Bassen | 2016-05-12 02:55:01 +0200 |
commit | 11d639f92f2c7067a0e7cc949f147abd506514ec (patch) | |
tree | fef75bcb253462541982c678d0b7260fc5141811 /include/plist | |
parent | 449e27bf754f903f856a741e163a9e4a0c8037b0 (diff) | |
download | libplist-11d639f92f2c7067a0e7cc949f147abd506514ec.tar.gz libplist-11d639f92f2c7067a0e7cc949f147abd506514ec.tar.bz2 |
Implement plist_from_memory()
Rather than having everyone reimplement binary/XML plist detection by
looking at the first bytes of the plist content, it's better to do this
detection in libplist and hide that internal detail from library users.
Diffstat (limited to 'include/plist')
-rw-r--r-- | include/plist/plist.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/plist/plist.h b/include/plist/plist.h index 2b7e1a1..7e59acb 100644 --- a/include/plist/plist.h +++ b/include/plist/plist.h @@ -617,6 +617,17 @@ extern "C" void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist); /** + * Import the #plist_t structure from memory data. + * This method will look at the first bytes of plist_data + * to determine if plist_data contains a binary or XML plist. + * + * @param plist_data a pointer to the memory buffer containing plist data. + * @param length length of the buffer to read. + * @param plist a pointer to the imported plist. + */ + void plist_from_memory(const char *plist_data, uint32_t length, plist_t * plist); + + /** * Test if in-memory plist data is binary or XML * This method will look at the first bytes of plist_data * to determine if plist_data contains a binary or XML plist. |