aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-roster-model.c
diff options
context:
space:
mode:
authorLaurent Contzen <lcontzen@gmail.com>2012-08-04 18:30:08 +0800
committerLaurent Contzen <lcontzen@gmail.com>2012-08-06 17:02:18 +0800
commit93da7465f929f0cb950adb76e7b645f5ff23f1ad (patch)
treee7cfded0d5e989ff40d1e29d84b31c259b2fe81c /libempathy-gtk/empathy-roster-model.c
parente0542a641adc30e04255b1eb561bbcd6e0b17da2 (diff)
downloadgsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar.gz
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar.bz2
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar.lz
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar.xz
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.tar.zst
gsoc2013-empathy-93da7465f929f0cb950adb76e7b645f5ff23f1ad.zip
Added new function _get_top_individuals in the model
empathy-roster-model: new function _get_top_individuals empathy-roster-model-manager: implemented _get_top_individuals empathy-roster-view: uses the roster-model's _get_top_individuals instead of the individual-manager's
Diffstat (limited to 'libempathy-gtk/empathy-roster-model.c')
-rw-r--r--libempathy-gtk/empathy-roster-model.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-roster-model.c b/libempathy-gtk/empathy-roster-model.c
index 80a82bf1d..37ca594fe 100644
--- a/libempathy-gtk/empathy-roster-model.c
+++ b/libempathy-gtk/empathy-roster-model.c
@@ -134,3 +134,24 @@ empathy_roster_model_get_groups_for_individual (EmpathyRosterModel *self,
return (* iface->get_groups_for_individual) (self, individual);
}
+
+/**
+ * empathy_roster_model_get_top_individuals:
+ * @self: a #EmpathyRosterModel
+ *
+ * Returns a list of the top_individuals.
+ *
+ * Return value: (transfer none): a #GList of #FolksIndividual
+ */
+GList *
+empathy_roster_model_get_top_individuals (EmpathyRosterModel *self)
+{
+ EmpathyRosterModelInterface *iface;
+
+ g_return_val_if_fail (EMPATHY_IS_ROSTER_MODEL (self), NULL);
+
+ iface = EMPATHY_ROSTER_MODEL_GET_IFACE (self);
+ g_return_val_if_fail (iface->get_top_individuals != NULL, NULL);
+
+ return (* iface->get_top_individuals) (self);
+}