claim_all_resources


Description:

public List<Source>? claim_all_resources ()

Claims all previously used sources that have not yet been claimed by new_child and returns them in a List.

Note that previously used sources can only be claimed once, so subsequent calls to this function for this will return null.

The this is then expected to compare the returned list with a current list of resources from a remote server, create new Source instances as needed with new_child, discard unneeded Source instances with remove, and export the remaining instances with add_source.

The sources returned in the list are referenced for thread-safety. They must each be unreferenced with unref when finished with them. Free the returned List itself with g_list_free.

An easy way to free the list properly in one step is as follows:

  g_list_free_full (list, g_object_unref);

Parameters:

this

an CollectionBackend

Returns:

a list of previously used sources