[empathy/mc5: 188/483] Add an API to get the num of CMs



commit 9dfae3e6a3b7ca4751c2249590eca8317768e9b9
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Jul 23 12:31:27 2009 +0200

    Add an API to get the num of CMs

 libempathy/empathy-connection-managers.c |   12 ++++++++++++
 libempathy/empathy-connection-managers.h |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-connection-managers.c b/libempathy/empathy-connection-managers.c
index 587a463..82699d3 100644
--- a/libempathy/empathy-connection-managers.c
+++ b/libempathy/empathy-connection-managers.c
@@ -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);
+}
diff --git a/libempathy/empathy-connection-managers.h b/libempathy/empathy-connection-managers.h
index 0c41479..17289d3 100644
--- a/libempathy/empathy-connection-managers.h
+++ b/libempathy/empathy-connection-managers.h
@@ -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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]