diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-02-01 13:54:00 -0500 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-02-01 13:58:56 -0500 |
commit | a687785628216f8f73c699096e9aae4a07b811c6 (patch) | |
tree | 9a520514155cbe632b1bd771e773abb3e506a951 /plugins | |
parent | bf805ba0b2ecced81e5c2830a79d021a42da91a7 (diff) | |
parent | e4cccf0a604c7cdf1107aa9b5d9cdaa996bcc702 (diff) |
Merge remote-tracking branch 'siraj/windows-compile-fix'
Conflicts:
lib/loudmouth/Makefile.am
plugins/console.c
src/Makefile.am
src/connection.c
src/error.c
src/plugin-loader.c
src/plugin.c
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Makefile.am | 45 | ||||
-rw-r--r-- | plugins/console.c | 4 | ||||
-rw-r--r-- | plugins/gateways.c | 4 | ||||
-rw-r--r-- | plugins/test.c | 30 | ||||
-rw-r--r-- | plugins/test.h | 5 |
5 files changed, 52 insertions, 36 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 0330cec53..a6b32eacb 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,31 +1,31 @@ plugindir = $(libdir)/telepathy/gabble-0 installable_plugins = \ - console.la \ - gateways.la + libconsole.la \ + libgateways.la -test_only_plugins = \ - test.la +libtest_only_plugins = \ + libtest.la -# testing-only plugins +# libtesting-only plugins if ENABLE_INSTALLED_TESTS noinst_LTLIBRARIES = \ $(NULL) -testplugindir = $(gabbletestsdir)/plugins -testplugin_LTLIBRARIES = \ - $(test_only_plugins) \ +libtestplugindir = $(gabbletestsdir)/plugins +libtestplugin_LTLIBRARIES = \ + $(libtest_only_plugins) \ $(NULL) -test_la_LDFLAGS = $(AM_LDFLAGS) +libtest_la_LDFLAGS = $(AM_LDFLAGS) else noinst_LTLIBRARIES = \ - $(test_only_plugins) \ + $(libtest_only_plugins) \ $(NULL) -# because test.la is not installed, libtool will want to compile it as static +# because libtest.la is not installed, libtool will want to compile it as static # despite -shared (a convenience library), unless we also use -rpath -test_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir) +libtest_la_LDFLAGS = $(AM_LDFLAGS) -rpath $(plugindir) endif if ENABLE_PLUGINS @@ -42,17 +42,30 @@ EXTRA_DIST = \ telepathy-gabble-xmpp-console endif -AM_LDFLAGS = -module -avoid-version -shared +AM_LDFLAGS = -avoid-version -shared -no-undefined -test_la_SOURCES = \ +if WINDOWS +ALL_PLUGIN_LIBS = \ + @WOCKY_LIBS@ \ + @GLIB_LIBS@ \ + @TP_GLIB_LIBS@ \ + $(top_builddir)/extensions/libgabble-extensions.la \ + $(top_builddir)/src/libgabble-plugins.la + +libtest_la_LIBADD = $(ALL_PLUGIN_LIBS) +libgateways_la_LIBADD = $(ALL_PLUGIN_LIBS) +libconsole_la_LIBADD = $(ALL_PLUGIN_LIBS) +endif + +libtest_la_SOURCES = \ test.c \ test.h -gateways_la_SOURCES = \ +libgateways_la_SOURCES = \ gateways.c \ gateways.h -console_la_SOURCES = \ +libconsole_la_SOURCES = \ console.c \ console.h diff --git a/plugins/console.c b/plugins/console.c index 8d6795c9d..7e980dbf8 100644 --- a/plugins/console.c +++ b/plugins/console.c @@ -80,7 +80,7 @@ static void gabble_console_plugin_create_sidecar_async ( GabblePlugin *plugin, const gchar *sidecar_interface, - GabbleConnection *connection, + GabblePluginConnection *connection, WockySession *session, GAsyncReadyCallback callback, gpointer user_data) @@ -315,7 +315,7 @@ gabble_console_sidecar_class_init (GabbleConsoleSidecarClass *klass) g_object_class_install_property (object_class, PROP_CONNECTION, g_param_spec_object ("connection", "Connection", "Gabble connection", - GABBLE_TYPE_CONNECTION, + GABBLE_TYPE_PLUGIN_CONNECTION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_SESSION, diff --git a/plugins/gateways.c b/plugins/gateways.c index 1e7b141a2..139c28de6 100644 --- a/plugins/gateways.c +++ b/plugins/gateways.c @@ -78,7 +78,7 @@ static void gabble_gateway_plugin_create_sidecar_async ( GabblePlugin *plugin, const gchar *sidecar_interface, - GabbleConnection *connection, + GabblePluginConnection *connection, WockySession *session, GAsyncReadyCallback callback, gpointer user_data) @@ -353,7 +353,7 @@ gabble_gateway_sidecar_class_init (GabbleGatewaySidecarClass *klass) g_object_class_install_property (object_class, PROP_CONNECTION, g_param_spec_object ("connection", "Connection", "Gabble connection", - GABBLE_TYPE_CONNECTION, + GABBLE_TYPE_PLUGIN_CONNECTION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_SESSION, diff --git a/plugins/test.c b/plugins/test.c index 43b18ea3b..691b84969 100644 --- a/plugins/test.c +++ b/plugins/test.c @@ -83,7 +83,7 @@ static void test_plugin_create_sidecar_async ( GabblePlugin *plugin, const gchar *sidecar_interface, - GabbleConnection *connection, + GabblePluginConnection *plugin_connection, WockySession *session, GAsyncReadyCallback callback, gpointer user_data) @@ -106,7 +106,7 @@ test_plugin_create_sidecar_async ( { g_async_initable_new_async (TEST_TYPE_SIDECAR_IQ, G_PRIORITY_DEFAULT, NULL, sidecar_iq_created_cb, result, "session", session, - "connection", connection, NULL); + "plugin-connection", plugin_connection, NULL); return; } else @@ -149,15 +149,16 @@ test_plugin_create_sidecar_finish ( static GPtrArray * test_plugin_create_channel_managers (GabblePlugin *plugin, + GabblePluginConnection *plugin_connection, TpBaseConnection *connection) { GPtrArray *ret = g_ptr_array_new (); - DEBUG ("plugin %p on connection %p", plugin, connection); + DEBUG ("plugin %p on connection %p", plugin, plugin_connection); g_ptr_array_add (ret, g_object_new (TEST_TYPE_CHANNEL_MANAGER, - "connection", connection, + "plugin-connection", plugin_connection, NULL)); return ret; @@ -360,7 +361,7 @@ test_sidecar_iq_set_property ( g_ptr_array_add (identities, identity); /* set own caps so we proper reply to disco#info */ - hash = gabble_connection_add_sidecar_own_caps (self->connection, + hash = gabble_plugin_connection_add_sidecar_own_caps (self->connection, features, identities); g_free (hash); @@ -399,9 +400,9 @@ test_sidecar_iq_class_init (TestSidecarIQClass *klass) WOCKY_TYPE_SESSION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_CONNECTION, - g_param_spec_object ("connection", "Gabble Connection", - "Gabble connection", - GABBLE_TYPE_CONNECTION, + g_param_spec_object ("plugin-connection", "Gabble Plugin Connection", + "Gabble Plugin Connection", + GABBLE_TYPE_PLUGIN_CONNECTION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); } @@ -539,7 +540,7 @@ test_channel_manager_set_property ( /* Not reffing this: the connection owns all channel managers, so it * must outlive us. Taking a reference leads to a cycle. */ - self->connection = g_value_get_object (value); + self->plugin_connection = g_value_get_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -558,7 +559,7 @@ test_channel_manager_get_property ( switch (property_id) { case PROP_CONNECTION: - g_value_set_object (value, self->connection); + g_value_set_object (value, self->plugin_connection); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -583,7 +584,8 @@ test_channel_manager_constructed (GObject *object) if (G_OBJECT_CLASS (test_channel_manager_parent_class)->constructed != NULL) G_OBJECT_CLASS (test_channel_manager_parent_class)->constructed (object); - tp_g_signal_connect_object (self->connection, "porter-available", + tp_g_signal_connect_object (self->plugin_connection, + "porter-available", G_CALLBACK (test_channel_manager_porter_available_cb), self, 0); } @@ -598,9 +600,9 @@ test_channel_manager_class_init (TestChannelManagerClass *klass) oclass->constructed = test_channel_manager_constructed; g_object_class_install_property (oclass, PROP_CONNECTION, - g_param_spec_object ("connection", "Gabble Connection", - "Gabble connection", - GABBLE_TYPE_CONNECTION, + g_param_spec_object ("plugin-connection", "Gabble Plugin Connection", + "Gabble Plugin Connection", + GABBLE_TYPE_PLUGIN_CONNECTION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); } diff --git a/plugins/test.h b/plugins/test.h index 6fe0d1434..cfd441f55 100644 --- a/plugins/test.h +++ b/plugins/test.h @@ -3,6 +3,7 @@ #include <gio/gio.h> #include <wocky/wocky-session.h> #include <gabble/gabble.h> +#include <gabble/plugin-connection.h> /* Plugin */ typedef struct _TestPluginClass TestPluginClass; @@ -104,7 +105,7 @@ struct _TestSidecarIQ { GObject parent; GSimpleAsyncResult *result; WockySession *session; - GabbleConnection *connection; + GabblePluginConnection *connection; }; GType test_sidecar_iq_get_type (void); @@ -134,7 +135,7 @@ struct _TestChannelManagerClass { struct _TestChannelManager { GObject parent; - GabbleConnection *connection; + GabblePluginConnection *plugin_connection; }; GType test_channel_manager_get_type (void); |