]> git.0d.be Git - empathy.git/commitdiff
Add an API to get the num of CMs
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 23 Jul 2009 10:31:27 +0000 (12:31 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Wed, 29 Jul 2009 22:13:19 +0000 (00:13 +0200)
libempathy/empathy-connection-managers.c
libempathy/empathy-connection-managers.h

index 587a463a8cf0b9e6381fa74576346dc21c16d369..82699d3d63da708eb2dc0dd94d06b8921fc0f6d3 100644 (file)
@@ -295,3 +295,15 @@ empathy_connection_managers_get_cm (EmpathyConnectionManagers *managers,
 
   return NULL;
 }
+
+guint
+empathy_connection_managers_get_cms_num (EmpathyConnectionManagers *managers)
+{
+  EmpathyConnectionManagersPriv *priv;
+
+  g_return_val_if_fail (EMPATHY_IS_CONNECTION_MANAGERS (managers), 0);
+
+  priv = GET_PRIV (managers);
+
+  return g_list_length (priv->cms);
+}
index 0c4147951c24fbe1a18dd0c16b34d4bd0f073a8a..17289d36dfff7404f7af1da6a230b5ac28192bb2 100644 (file)
@@ -66,6 +66,8 @@ void empathy_connection_managers_update (EmpathyConnectionManagers *managers);
 
 GList * empathy_connection_managers_get_cms (
     EmpathyConnectionManagers *managers);
+guint empathy_connection_managers_get_cms_num
+    (EmpathyConnectionManagers *managers);
 
 TpConnectionManager *empathy_connection_managers_get_cm (
   EmpathyConnectionManagers *managers, const gchar *cm);