[Bug 44649] Gabble plugin API symbols should be factored out to a separate library

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 12 12:50:36 CET 2012


https://bugs.freedesktop.org/show_bug.cgi?id=44649

--- Comment #10 from Olli Salli <ollisal at gmail.com> 2012-01-12 03:50:36 PST ---
(In reply to comment #8)
> (In reply to comment #6)
> > Thus my idea: split out exactly those parts required by the gabble/connection.h
> > API from GabbleConnection to a separate object. This could be something like
> > GabbleSidecarManager, better name suggestions welcome.
> 
> ... or to a GInterface that GabbleConnection would implement.
> 
> In Mission Control, the plugin API is entirely in terms of GInterfaces, evenly
> divided between "implement this in your plugin" and "only implement this in
> MC"; then MC contains exactly one implementation of each "implement this in MC"
> interface. This might be overkill, but it keeps the plugins library really
> small.
> 

Hey. Good one that! Very good! Excellent in fact. It's dependency inversion at
the level of the plugin API.

Siraj: for the moment, this would mean moving these offending GabbleConnection
symbols to an explicit GabbleConnectionPluginServices GInterface, and making
Gabble fill the GabbleConnectionPluginServicesInterface structure for it with
function pointers to the current implementations.

The current gabble/connection.h functions would be renamed to
gabble_connection_plugin_services_add_sidecar_capabilities etc, which take a
GabbleConnectionPluginServices * instead of GabbleConnection * and forward the
calls through the interface vtable, as usual for GInterfaces.

You also need to move the GabbleConnection signals plugins connect to to
GabbleConnectionPluginServices. grep for g_signal_connect in ALL plugins to
find out which these actually are.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.



More information about the telepathy-bugs mailing list