]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-tube.c
tp-tube: remove priv->initiator_contact and priv->factory as they are not used
[empathy.git] / libempathy / empathy-tp-tube.c
index 088c940521301209af3f7bc26971325b3cf4ab24..008559338b48420e3736dbe0b6273d5091c77a66 100644 (file)
@@ -25,7 +25,6 @@
 #include <telepathy-glib/util.h>
 #include <extensions/extensions.h>
 
-#include "empathy-contact-factory.h"
 #include "empathy-enum-types.h"
 #include "empathy-tp-tube.h"
 #include "empathy-utils.h"
@@ -64,14 +63,10 @@ free_empathy_tp_tube_accept_data (gpointer data)
 typedef struct
 {
   TpChannel *channel;
-  guint initiator;
-  guint type;
   gchar *service;
   /* FIXME readd support for parameters.. */
   GHashTable *parameters;
   EmpTubeChannelState state;
-  EmpathyContact *initiator_contact;
-  EmpathyContactFactory *factory;
 } EmpathyTpTubePriv;
 
 enum
@@ -204,10 +199,6 @@ tp_tube_finalize (GObject *object)
         "closing tube", NULL, NULL);
       g_object_unref (priv->channel);
     }
-  if (priv->initiator_contact)
-      g_object_unref (priv->initiator_contact);
-  if (priv->factory)
-      g_object_unref (priv->factory);
 
   g_free (priv->service);
 
@@ -229,13 +220,12 @@ empathy_tp_tube_class_init (EmpathyTpTubeClass *klass)
 
   g_object_class_install_property (object_class, PROP_CHANNEL,
       g_param_spec_object ("channel", "channel", "channel", TP_TYPE_CHANNEL,
-      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME |
-        G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB));
+      G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
 
   g_object_class_install_property (object_class, PROP_STATE,
-      g_param_spec_uint ("state", "state", "state", 0, G_MAXUINT, 0,
-        G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK |
-        G_PARAM_STATIC_BLURB));
+      g_param_spec_uint ("state", "state", "state",
+        0, NUM_EMP_TUBE_CHANNEL_STATES, 0,
+        G_PARAM_READABLE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_STRINGS));
 
   signals[DESTROY] = g_signal_new ("destroy",
       G_TYPE_FROM_CLASS (klass),
@@ -254,8 +244,6 @@ empathy_tp_tube_init (EmpathyTpTube *tube)
                EMPATHY_TYPE_TP_TUBE, EmpathyTpTubePriv);
 
   tube->priv = priv;
-
-  priv->factory = empathy_contact_factory_dup_singleton ();
 }
 
 EmpathyTpTube *