]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-connection-managers.c
add myself to AUTHORS
[empathy.git] / libempathy / empathy-connection-managers.c
index 587a463a8cf0b9e6381fa74576346dc21c16d369..5d381075eda87d6ac69fa23e67cdd1c9308ad203 100644 (file)
@@ -85,7 +85,6 @@ empathy_connection_managers_init (EmpathyConnectionManagers *obj)
 }
 
 static void empathy_connection_managers_dispose (GObject *object);
-static void empathy_connection_managers_finalize (GObject *object);
 
 static GObject *
 empathy_connection_managers_constructor (GType type,
@@ -112,8 +111,8 @@ empathy_connection_managers_get_property (GObject *object,
     GValue *value,
     GParamSpec *pspec)
 {
-  EmpathyConnectionManagers *managers = EMPATHY_CONNECTION_MANAGERS (object);
-  EmpathyConnectionManagersPriv *priv = GET_PRIV (managers);
+  EmpathyConnectionManagers *self = EMPATHY_CONNECTION_MANAGERS (object);
+  EmpathyConnectionManagersPriv *priv = GET_PRIV (self);
 
   switch (prop_id)
     {
@@ -138,7 +137,6 @@ empathy_connection_managers_class_init (
 
   object_class->constructor = empathy_connection_managers_constructor;
   object_class->dispose = empathy_connection_managers_dispose;
-  object_class->finalize = empathy_connection_managers_finalize;
   object_class->get_property = empathy_connection_managers_get_property;
 
   g_object_class_install_property (object_class, PROP_READY,
@@ -194,20 +192,6 @@ empathy_connection_managers_dispose (GObject *object)
     G_OBJECT_CLASS (empathy_connection_managers_parent_class)->dispose (object);
 }
 
-void
-empathy_connection_managers_finalize (GObject *object)
-{
-#if 0
-  EmpathyConnectionManagers *self = EMPATHY_CONNECTION_MANAGERS (object);
-  EmpathyConnectionManagersPriv *priv =
-    EMPATHY_CONNECTION_MANAGERS_GET_PRIVATE (self);
-
-  /* free any data held directly by the object here */
-
-  G_OBJECT_CLASS (empathy_connection_managers_parent_class)->finalize (object);
-#endif
-}
-
 EmpathyConnectionManagers *
 empathy_connection_managers_dup_singleton (void)
 {
@@ -216,9 +200,9 @@ empathy_connection_managers_dup_singleton (void)
 }
 
 gboolean
-empathy_connection_managers_is_ready (EmpathyConnectionManagers *managers)
+empathy_connection_managers_is_ready (EmpathyConnectionManagers *self)
 {
-  EmpathyConnectionManagersPriv *priv = GET_PRIV (managers);
+  EmpathyConnectionManagersPriv *priv = GET_PRIV (self);
   return priv->ready;
 }
 
@@ -261,28 +245,28 @@ out:
 }
 
 void
-empathy_connection_managers_update (EmpathyConnectionManagers *managers)
+empathy_connection_managers_update (EmpathyConnectionManagers *self)
 {
-  EmpathyConnectionManagersPriv *priv = GET_PRIV (managers);
+  EmpathyConnectionManagersPriv *priv = GET_PRIV (self);
 
   tp_list_connection_managers (priv->dbus,
     empathy_connection_managers_listed_cb,
-    NULL, NULL, G_OBJECT (managers));
+    NULL, NULL, G_OBJECT (self));
 }
 
 GList *
-empathy_connection_managers_get_cms (EmpathyConnectionManagers *managers)
+empathy_connection_managers_get_cms (EmpathyConnectionManagers *self)
 {
-  EmpathyConnectionManagersPriv *priv = GET_PRIV (managers);
+  EmpathyConnectionManagersPriv *priv = GET_PRIV (self);
 
   return priv->cms;
 }
 
 TpConnectionManager *
-empathy_connection_managers_get_cm (EmpathyConnectionManagers *managers,
+empathy_connection_managers_get_cm (EmpathyConnectionManagers *self,
   const gchar *cm)
 {
-  EmpathyConnectionManagersPriv *priv = GET_PRIV (managers);
+  EmpathyConnectionManagersPriv *priv = GET_PRIV (self);
   GList *l;
 
   for (l = priv->cms ; l != NULL; l = g_list_next (l))
@@ -295,3 +279,15 @@ empathy_connection_managers_get_cm (EmpathyConnectionManagers *managers,
 
   return NULL;
 }
+
+guint
+empathy_connection_managers_get_cms_num (EmpathyConnectionManagers *self)
+{
+  EmpathyConnectionManagersPriv *priv;
+
+  g_return_val_if_fail (EMPATHY_IS_CONNECTION_MANAGERS (self), 0);
+
+  priv = GET_PRIV (self);
+
+  return g_list_length (priv->cms);
+}