D-Bus adaptor
While we can create Grilo plugins easily in C. It's much harder to create them in other languages. This is because plugins are expected to be installed in a specific directory and loaded with GModule
, which is only compatible with C.
A solution I imagined would be to create something like a D-Bus adaptor that takes a plugin and exposes it via a D-Bus interface by creating a server.
On the application side, we can use said plugin easily by using the D-Bus adaptor and connecting to the exposed D-Bus interface. This would, of course, require that all data be serializable which I don't know if it's true.
Here's some pseudocode to demonstrate my ideas:
plugin = grilo_plugin_new();
plugin.id = "com.vixalien.grilo-plugin"
// setup plugin
grilo_dbus_expose(plugin, "com.vixalien.grilo-plugin")
// exposed at somewhere like /org/gnome/Grilo/plugins/com.vixalien.grilo-plugin
// in my application
plugin = grilo_dbus_connect("com.vixalien.grilo-plugin")
// use the plugin