[telepathy-gabble/master] Expose underlying wocky porter to things using the connection object.
Vivek Dasmohapatra
vivek at collabora.co.uk
Sun Dec 27 11:28:41 PST 2009
---
src/connection.c | 20 ++++++++++++++++++++
src/connection.h | 2 ++
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/connection.c b/src/connection.c
index 1166b97..44f5fd0 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1153,6 +1153,26 @@ gabble_connection_get_full_jid (GabbleConnection *conn)
}
/**
+ * gabble_connection_get_porter:
+ *
+ * Returns: the #WockyPorter instance driving this connection.
+ */
+
+WockyPorter *gabble_connection_get_porter (GabbleConnection *conn)
+{
+ GabbleConnectionPrivate *priv;
+
+ g_assert (GABBLE_IS_CONNECTION (conn));
+
+ priv = conn->priv;
+
+ if (priv->porter != NULL)
+ return g_object_ref (priv->porter);
+
+ return NULL;
+}
+
+/**
* _gabble_connection_send
*
* Send an LmMessage and trap network errors appropriately.
diff --git a/src/connection.h b/src/connection.h
index f99c243..57a9ae5 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -220,6 +220,8 @@ GType gabble_connection_get_type (void);
gchar *gabble_connection_get_full_jid (GabbleConnection *conn);
+WockyPorter *gabble_connection_get_porter (GabbleConnection *conn);
+
gboolean _gabble_connection_set_properties_from_account (
GabbleConnection *conn, const gchar *account, GError **error);
gboolean _gabble_connection_send (GabbleConnection *conn, LmMessage *msg,
--
1.5.6.5
More information about the telepathy-commits
mailing list