[PATCH 0/2] Synchronous versions for asynchronous functions



Hi everybody!

These patches add synchronous versions to grl_media_source_metadata() and
grl_media_source_browse() functions for free. In this case, "for free" means
that plugin developer does not need to deal with a specific synchronous
function; she just implement the asynchronous callback, as it is done so far,
and Grilo core will provide a synchronous version on top of the asynchronous
one.

Right now, as I said, this proposal just covers metadata() and browse()
functions. If feature goes ahead, I'll add support for remaining functions
(query(), search(), and s on) where it makes sense.

It's worth to note that the synchronous function does not completely blocks
everthing; rather it works like gtk_dialog_run(): while waiting for results to
come, idle functions and signals are still executed and received. So there will
no problem with blocking UI.

As example, grl_media_source_browse() returns a GList with the results.

As usual, any comment is welcome.

	J.A.


Juan A. Suarez Romero (2):
  core: Add synchronous version of grl_media_source_metadata() function
  core: Add synchronous version of grl_media_source_browse() function

 src/grl-media-source.c |  177 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/grl-media-source.h |   15 ++++
 2 files changed, 192 insertions(+), 0 deletions(-)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]