[telepathy-gabble/master] Pass TpBaseConn and WockySession to sidecars
Will Thompson
will.thompson at collabora.co.uk
Wed Nov 18 04:15:08 PST 2009
---
plugins/test.c | 2 ++
src/conn-sidecars.c | 4 ++--
src/plugin-loader.c | 6 ++++--
src/plugin-loader.h | 6 +++++-
src/plugin.c | 5 ++++-
src/plugin.h | 8 +++++++-
6 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/plugins/test.c b/plugins/test.c
index 626b639..3be25da 100644
--- a/plugins/test.c
+++ b/plugins/test.c
@@ -51,6 +51,8 @@ static void
test_plugin_create_sidecar (
GabblePlugin *plugin,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data)
{
diff --git a/src/conn-sidecars.c b/src/conn-sidecars.c
index e21766e..11f2917 100644
--- a/src/conn-sidecars.c
+++ b/src/conn-sidecars.c
@@ -256,8 +256,8 @@ gabble_connection_ensure_sidecar (
loader = gabble_plugin_loader_dup ();
g_hash_table_insert (conn->pending_sidecars, g_strdup (sidecar_iface),
g_list_prepend (NULL, context));
- gabble_plugin_loader_create_sidecar (loader, sidecar_iface,
- create_sidecar_cb, grr_new (conn, sidecar_iface));
+ gabble_plugin_loader_create_sidecar (loader, sidecar_iface, base_conn,
+ conn->session, create_sidecar_cb, grr_new (conn, sidecar_iface));
g_object_unref (loader);
}
diff --git a/src/plugin-loader.c b/src/plugin-loader.c
index 1c29401..026fedd 100644
--- a/src/plugin-loader.c
+++ b/src/plugin-loader.c
@@ -252,6 +252,8 @@ void
gabble_plugin_loader_create_sidecar (
GabblePluginLoader *self,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -267,8 +269,8 @@ gabble_plugin_loader_create_sidecar (
GSimpleAsyncResult *res = g_simple_async_result_new (G_OBJECT (self),
callback, user_data, gabble_plugin_loader_create_sidecar);
- gabble_plugin_create_sidecar (p, sidecar_interface, create_sidecar_cb,
- res);
+ gabble_plugin_create_sidecar (p, sidecar_interface, connection, session,
+ create_sidecar_cb, res);
return;
}
}
diff --git a/src/plugin-loader.h b/src/plugin-loader.h
index fc86067..8661f09 100644
--- a/src/plugin-loader.h
+++ b/src/plugin-loader.h
@@ -21,9 +21,11 @@
#define __PLUGIN_LOADER_H__
#include <glib-object.h>
-
#include <gio/gio.h>
+#include <telepathy-glib/base-connection.h>
+#include <wocky/wocky-session.h>
+
#include "sidecar.h"
typedef struct _GabblePluginLoader GabblePluginLoader;
@@ -64,6 +66,8 @@ GabblePluginLoader *gabble_plugin_loader_dup (void);
void gabble_plugin_loader_create_sidecar (
GabblePluginLoader *self,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/src/plugin.c b/src/plugin.c
index 7694c73..f57291b 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -87,6 +87,8 @@ void
gabble_plugin_create_sidecar (
GabblePlugin *plugin,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -103,7 +105,8 @@ gabble_plugin_create_sidecar (
"'%s' is buggy: it claims to implement %s, but does not implement "
"create_sidecar", iface->name, sidecar_interface);
else
- iface->create_sidecar (plugin, sidecar_interface, callback, user_data);
+ iface->create_sidecar (plugin, sidecar_interface, connection, session,
+ callback, user_data);
}
GabbleSidecar *
diff --git a/src/plugin.h b/src/plugin.h
index e11a3e9..e5b2054 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -21,9 +21,11 @@
#define __PLUGIN_H__
#include <glib-object.h>
-
#include <gio/gio.h>
+#include <telepathy-glib/base-connection.h>
+#include <wocky/wocky-session.h>
+
#include "sidecar.h"
#define GABBLE_TYPE_PLUGIN (gabble_plugin_get_type ())
@@ -41,6 +43,8 @@ typedef struct _GabblePluginInterface GabblePluginInterface;
typedef void (*GabblePluginCreateSidecarImpl) (
GabblePlugin *plugin,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -78,6 +82,8 @@ gboolean gabble_plugin_implements_sidecar (
void gabble_plugin_create_sidecar (
GabblePlugin *plugin,
const gchar *sidecar_interface,
+ TpBaseConnection *connection,
+ WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data);
--
1.5.6.5
More information about the telepathy-commits
mailing list