aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 21:28:09 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-11 21:28:09 +0800
commitd339921eaf86de17aaae585070ae479cfbf4734f (patch)
treee1256e36416e33da304fae666718e558944a6237 /libempathy
parentfabcd2ec298f6773112c6fad57238c6f7bc2d77e (diff)
downloadgsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar.gz
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar.bz2
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar.lz
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar.xz
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.tar.zst
gsoc2013-empathy-d339921eaf86de17aaae585070ae479cfbf4734f.zip
empathy_dispatcher_join_muc: get an account instead of a connection
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c13
-rw-r--r--libempathy/empathy-dispatcher.h2
2 files changed, 10 insertions, 5 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index e5abfde8b..a286d5079 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -1305,9 +1305,9 @@ dispatcher_request_handles_cb (TpConnection *connection,
}
void
-empathy_dispatcher_join_muc (TpConnection *connection,
- const gchar *roomname,
- gint64 timestamp)
+empathy_dispatcher_join_muc (TpAccount *account,
+ const gchar *roomname,
+ gint64 timestamp)
{
EmpathyDispatcher *self;
EmpathyDispatcherPriv *priv;
@@ -1315,13 +1315,18 @@ empathy_dispatcher_join_muc (TpConnection *connection,
ConnectionData *connection_data;
const gchar *names[] = { roomname, NULL };
TpProxyPendingCall *call;
+ TpConnection *connection;
- g_return_if_fail (TP_IS_CONNECTION (connection));
+ g_return_if_fail (TP_IS_ACCOUNT (account));
g_return_if_fail (!EMP_STR_EMPTY (roomname));
self = empathy_dispatcher_dup_singleton ();
priv = GET_PRIV (self);
+ connection = tp_account_get_connection (account);
+ if (connection == NULL)
+ return;
+
connection_data = g_hash_table_lookup (priv->connections, connection);
g_assert (connection_data != NULL);
diff --git a/libempathy/empathy-dispatcher.h b/libempathy/empathy-dispatcher.h
index 918a4286a..7991de085 100644
--- a/libempathy/empathy-dispatcher.h
+++ b/libempathy/empathy-dispatcher.h
@@ -83,7 +83,7 @@ void empathy_dispatcher_chat_with_contact (EmpathyContact *contact,
gint64 timestamp);
/* Request a muc channel */
-void empathy_dispatcher_join_muc (TpConnection *connection,
+void empathy_dispatcher_join_muc (TpAccount *account,
const gchar *roomname,
gint64 timestamp);