Subject: Re: binary plist support
To: Bill Stouder-Studenmund <>
From: Jachym Holecek <>
List: tech-kern
Date: 10/10/2007 09:24:29
# Bill Stouder-Studenmund 2007-10-09:
> On Sat, Oct 06, 2007 at 10:25:03PM +0200, Jachym Holecek wrote:
> > On the API side, binary encoding is created/parsed by the following
> > functions:
> > 
> >   bool prop_dictionary_binary_externalize(prop_dictionary_t, uint8_t **,
> >       size_t *);
> >   bool prop_dictionary_binary_externalize_to_file(prop_dictionary_t,
> >       const char *);
> >   prop_dictionary_t prop_dictionary_binary_internalize(uint8_t *, size_t);
> Will you be changing prop_dictionary_internalize() to accept either 
> format? I think the current prop_dictionary_internalize() should become 
> prop_dictionary_xml_internalize() and prop_dictionary_internalize() will 
> differentiate.

I've kept the original names for XML, ie. prop_dictionary_internalize()
parses XML and ${...}_binary_internalize() the bplist format. On some
thought I think the application is responsible for choosing the right
format for its data, so I didn't want to put any transparency in the API.

The only exception is that ${...}_internalize_from_file() accepts both
formats (it tries XML first and failing that bplist) because it seemed
like a nice user convenience -- but I'm easy on this, we can introduce
${...}_binary_internalize_from_file() and keep the above convention.

	-- Jachym