diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-02-01 16:07:25 -0500 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-02-01 16:07:25 -0500 |
commit | ab745cbdead64a313fe3e8859cec5bf7c4382dc9 (patch) | |
tree | 024c6049bdae369f8833b02c0c5ed38691bbf419 /plugins/test.c | |
parent | 1d41beb99b03f828fd204e6e18fa7499360937b9 (diff) |
Revert "Merge remote-tracking branch 'siraj/plugin-api-change'"
This reverts commit bf805ba0b2ecced81e5c2830a79d021a42da91a7, reversing
changes made to 1296a2f5ce46e77787ca42eadb1c2ca4a957a09b.
Diffstat (limited to 'plugins/test.c')
-rw-r--r-- | plugins/test.c | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/plugins/test.c b/plugins/test.c index 43b18ea3b..05d784052 100644 --- a/plugins/test.c +++ b/plugins/test.c @@ -80,7 +80,7 @@ sidecar_iq_created_cb ( } static void -test_plugin_create_sidecar_async ( +test_plugin_create_sidecar ( GabblePlugin *plugin, const gchar *sidecar_interface, GabbleConnection *connection, @@ -90,8 +90,10 @@ test_plugin_create_sidecar_async ( { GSimpleAsyncResult *result = g_simple_async_result_new (G_OBJECT (plugin), callback, user_data, - test_plugin_create_sidecar_async); - + /* sic: all plugins share gabble_plugin_create_sidecar_finish() so we + * need to use the same source tag. + */ + gabble_plugin_create_sidecar); GabbleSidecar *sidecar = NULL; if (!tp_strdiff (sidecar_interface, IFACE_TEST)) @@ -122,31 +124,9 @@ test_plugin_create_sidecar_async ( g_simple_async_result_set_op_res_gpointer (result, sidecar, g_object_unref); g_simple_async_result_complete_in_idle (result); - g_object_unref (result); } -static GabbleSidecar * -test_plugin_create_sidecar_finish ( - GabblePlugin *plugin, - GAsyncResult *result, - GError **error) -{ - GabbleSidecar *sidecar; - - if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (result), - error)) - return NULL; - - g_return_val_if_fail (g_simple_async_result_is_valid (result, - G_OBJECT (plugin), test_plugin_create_sidecar_async), NULL); - - sidecar = GABBLE_SIDECAR (g_simple_async_result_get_op_res_gpointer ( - G_SIMPLE_ASYNC_RESULT (result))); - - return g_object_ref (sidecar); -} - static GPtrArray * test_plugin_create_channel_managers (GabblePlugin *plugin, TpBaseConnection *connection) @@ -184,8 +164,7 @@ plugin_iface_init ( iface->name = "Sidecar test plugin"; iface->version = PACKAGE_VERSION; iface->sidecar_interfaces = sidecar_interfaces; - iface->create_sidecar_async = test_plugin_create_sidecar_async; - iface->create_sidecar_finish = test_plugin_create_sidecar_finish; + iface->create_sidecar = test_plugin_create_sidecar; iface->create_channel_managers = test_plugin_create_channel_managers; iface->presence_statuses = test_presences; |