diff options
author | Alvaro Soliverez <alvaro.soliverez@collabora.co.uk> | 2012-03-14 19:18:05 -0300 |
---|---|---|
committer | Olli Salli <olli.salli@collabora.co.uk> | 2012-03-15 22:03:10 +0200 |
commit | 5754bc81e3f94589d91820fe34975dfb63730f28 (patch) | |
tree | 684d3f873abe2a5c5fcf19d3b6600f1d6a69e2f3 /salut | |
parent | 8005653315f77ce15ecd53c8875bd2a4072d292e (diff) |
Use a callback to get custom SalutProtocol in the plugin library, so
that plugin code does not depend on salut core code.
The ytstenut plugin creates a custom SalutProtocol in its initialize()
method but salut_protocol_new recursively depends on loads of salut symbols
through its use of salut_protocol_get_type(), so replaced direct binding to it
with a callback
Diffstat (limited to 'salut')
-rw-r--r-- | salut/plugin.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/salut/plugin.h b/salut/plugin.h index 5b7e7849..1c199973 100644 --- a/salut/plugin.h +++ b/salut/plugin.h @@ -65,9 +65,16 @@ typedef GPtrArray * (*SalutPluginCreateChannelManagersImpl) ( SalutPlugin *plugin, SalutPluginConnection *plugin_connection); +typedef TpBaseProtocol * (*SalutCreateProtocolImpl) (GType backend_type, + const gchar *dnssd_name, + const gchar *protocol_name, + const gchar *english_name, + const gchar *icon_name); + typedef void (*SalutPluginInitializeImpl) ( SalutPlugin *plugin, - TpBaseConnectionManager *connection_manager); + TpBaseConnectionManager *connection_manager, + SalutCreateProtocolImpl callback); #define SALUT_PLUGIN_CURRENT_VERSION 1 |