call-list: allow iterating elements

This commit is contained in:
Aleksander Morgado
2019-06-15 21:28:33 +02:00
parent dca00271ce
commit 8d267228cf
2 changed files with 20 additions and 0 deletions

View File

@@ -54,6 +54,20 @@ struct _MMCallListPrivate {
/*****************************************************************************/
void
mm_call_list_foreach (MMCallList *self,
MMCallListForeachFunc callback,
gpointer user_data)
{
GList *l;
g_assert (callback);
for (l = self->priv->list; l; l = g_list_next (l))
callback (MM_BASE_CALL (l->data), user_data);
}
/*****************************************************************************/
guint
mm_call_list_get_count (MMCallList *self)
{