filter


Description:

public List<Session> filter (SessionPoolFilterFunc? func)

Call func for each session in this.

The result value of func determines what happens to the session. func will be called with the session pool locked so no further actions on this can be performed from func.

If func returns REMOVE, the session will be set to the expired state and removed from this.

If func returns KEEP, the session will remain in this.

If func returns REF, the session will remain in this but will also be added with an additional ref to the result GList of this function..

When func is null, REF will be assumed for all sessions.

Parameters:

this

a SessionPool

func

a callback

user_data

user data passed to func

Returns:

a GList with all sessions for which func returned REF. After usage, each element in the GList should be unreffed before the list is freed.