Rework callbacks API for Grilo 0.2
Submitted by Sam Thursfield
Assigned to gri..@..e.bugs
Following on from IRC discussion and https://bugzilla.gnome.org/show_bug.cgi?id=663801 - how to change Grilo internals to make the API more bindable?
All callbacks currently have (scope: notified) annotation. In some cases the function is only called once, like GIO async result callbacks, so these can be made (scope: async) and brought more in line with GIO etc.
The more complicated case is _browse, _search, _query result callbacks. The most flexible solution (with a performance penalty for C code, but prevents any further binding issues) is to use a GClosure internally, so plugins will switch to calling g_closure_invoke() when they have data. Note that the callback signatures will also need to change in this case, because it requires that 'user_data' is the last parameter, and we currently pass a GError as the last param, so it's a major API break.
Version: git master