Ejemplo n.º 1
0
static int
is_cookie_used(struct listbox_item *item)
{
    if (item->type == BI_FOLDER) {
        struct listbox_item *root = item;

        foreach (item, root->child)
            if (is_object_used((struct cookie *) item->udata))
                return 1;

        return 0;
    }

    return is_object_used((struct cookie *) item->udata);
}
Ejemplo n.º 2
0
static void
delete_file_download(struct listbox_item *item, int last)
{
	struct file_download *file_download = item->udata;

	assert(!is_object_used(file_download));
	register_bottom_half(do_abort_download, file_download);
}
Ejemplo n.º 3
0
static void
delete_cache_entry_item(struct listbox_item *item, int last)
{
	struct cache_entry *cached = item->udata;

	assert(!is_object_used(cached));

	delete_cache_entry(cached);
}
Ejemplo n.º 4
0
static void
delete_auth_entry(struct listbox_item *item, int last)
{
	struct auth_entry *auth_entry = (struct auth_entry *)item->udata;

	assert(!is_object_used(auth_entry));

	del_auth_entry(auth_entry);
}
Ejemplo n.º 5
0
static void
delete_cookie_item(struct listbox_item *item, int last)
{
    struct cookie *cookie = (struct cookie *)item->udata;

    if (item->type == BI_FOLDER) {
        struct listbox_item *next, *root = item;

        /* Releasing refcounts on the cookie_server will automagically
         * delete it. */
        foreachsafe (item, next, root->child)
        delete_cookie_item(item, 0);
    } else {
        assert(!is_object_used(cookie));

        delete_cookie(cookie);
        set_cookies_dirty();
    }
}
Ejemplo n.º 6
0
static int
is_cache_entry_used(struct listbox_item *item)
{
	return is_object_used((struct cache_entry *) item->udata);
}
Ejemplo n.º 7
0
static int
is_file_download_used(struct listbox_item *item)
{
	return is_object_used((struct file_download *) item->udata);
}