[telepathy-gabble/master] connection: instantiate WockyPubsub

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Sep 25 02:29:41 PDT 2009


---
 src/connection.c |    8 ++++++++
 src/connection.h |    3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/connection.c b/src/connection.c
index d6fcd55..aa1615b 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -990,6 +990,12 @@ gabble_connection_dispose (GObject *object)
       priv->disconnect_timer = 0;
     }
 
+  if (self->pubsub != NULL)
+    {
+      g_object_unref (self->pubsub);
+      self->pubsub = NULL;
+    }
+
   if (G_OBJECT_CLASS (gabble_connection_parent_class)->dispose)
     G_OBJECT_CLASS (gabble_connection_parent_class)->dispose (object);
 }
@@ -1520,6 +1526,8 @@ connector_connected (GabbleConnection *self,
 
   lm_connection_set_porter (self->lmconn, priv->porter);
 
+  self->pubsub = wocky_pubsub_new (self->session);
+
   /* Don't use wocky_session_start as we don't want to start all the
    * components (Roster, presence-manager, etc) for now */
   wocky_porter_start (priv->porter);
diff --git a/src/connection.h b/src/connection.h
index 9bb3b10..d842045 100644
--- a/src/connection.h
+++ b/src/connection.h
@@ -191,6 +191,9 @@ struct _GabbleConnection {
     /* file transfer manager */
     GabbleFtManager *ft_manager;
 
+    /* pubsub */
+    WockyPubsub *pubsub;
+
     GabbleConnectionPrivate *priv;
 };
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list