Skip to content
Snippets Groups Projects
Commit 82abe417 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

session-bin: add _get_n_children() method

parent 90c6962a
No related branches found
No related tags found
No related merge requests found
......@@ -117,6 +117,18 @@ wp_session_bin_remove (WpSessionBin *self, WpSessionItem *item)
return g_ptr_array_remove_fast (priv->items, item);
}
/**
* wp_session_bin_get_n_children:
* @self: the session bin
*
* Returns: the number of child items in the bin
*/
guint
wp_session_bin_get_n_children (WpSessionBin *self)
{
WpSessionBinPrivate *priv = wp_session_bin_get_instance_private (self);
return priv->items->len;
}
struct _WpSessionBinIterator
{
......
......@@ -42,6 +42,9 @@ gboolean wp_session_bin_add (WpSessionBin *self, WpSessionItem *item);
WP_API
gboolean wp_session_bin_remove (WpSessionBin *self, WpSessionItem *item);
WP_API
guint wp_session_bin_get_n_children (WpSessionBin *self);
WP_API
WpIterator *wp_session_bin_iterate (WpSessionBin *self);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment