After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 667557 - Simplify plugin creation
Simplify plugin creation
Status: RESOLVED DUPLICATE of bug 711243
Product: grilo
Classification: Other
Component: core
git master
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on: 672921
Blocks:
 
 
Reported: 2012-01-09 14:08 UTC by Bastien Nocera
Modified: 2014-02-21 15:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2012-01-09 14:08:23 UTC
Plugin creation should be easier to create, using a more imperative style, and remove the requirements for the plugin to implement its own threading.

For example, for bug 656001, one could implement:

grilo_class->get_list = bbc_get_list;

static GList *
bbc_get_list ()
{
    content = http_grab (URL);
    /* do stuff with content */
    return list;
}

This could be further eased with macro to handle the GLib/Grilo boilerplate.
Comment 1 Bastien Nocera 2012-03-27 14:54:14 UTC
See g_simple_async_result_run_in_thread() for how to hide most of the gritty stuff.
Comment 2 Bastien Nocera 2014-02-21 15:26:19 UTC
The lua source (bug 711243) would pretty much take care of this.

*** This bug has been marked as a duplicate of bug 711243 ***