On Sat, 09.05.09 02:09, Marc-Andr? Lureau (marcandre.lureau at gmail.com) wrote: > > If we need to redesign this API then let's make it flexible enough to > > cater for the features Colin and I discussed on this list a while > > back. > > Ok, I will look back in archives. Do you have already recommendations > to make, like use only array of pointers of structs for a start? Have you seen my comments I just posted on IRC? <snip> 00:45 < mezcalero> elmarco: ok, i thought about this a bit now 00:45 < mezcalero> elmarco: here's my proposal 00:45 < mezcalero> elmarco: introduce pa_ext_stream_restore_info2 and add new entries at the end 00:45 < mezcalero> elmarco: declare that structure as extensible without being considered api/abi breakage 00:46 < mezcalero> then 00:46 < mezcalero> introduce pa_ext_stream_restore_write2() 00:46 < mezcalero> which takes a const pa_ext_stream_restore_info2** 00:46 < mezcalero> instead of pa_ext_stream_restore_info[] 00:46 < mezcalero> i.e. an array to pointers, instead of a simple array 00:46 < mezcalero> then 00:47 < mezcalero> beef up pa_ext_stream_restore_read() accordingly 00:47 < mezcalero> i.e. pa_ext_stream_restore_read2() which hands the new struct to the callback 00:47 < mezcalero> finally, as last step 00:47 < mezcalero> move the negotiation of extensions into connection setup 00:48 < mezcalero> i.e. in the response to AUTH we get a list of supported extensions 00:48 < mezcalero> plus their versions 00:48 < mezcalero> and then keep that around forever 00:49 < mezcalero> then we don't have to to enforce rules like "you have to run test first" 00:49 < mezcalero> elmarco: how does that sound to you? 00:49 < mezcalero> this would mean, two new calls, one new type, two new prototypes 00:49 < mezcalero> it's not that bad i would say 00:50 < mezcalero> the old versions of those calls, types, prototypes we would hide from doxygen 00:50 < mezcalero> elmarco: please ack! </snip> I think if we do this we should have all thinks in place to allow further changes without breaking API/ABI. Including those Colin and I were discussing. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4