4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * Use is subject to license terms.
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * Licensed under the Academic Free License version 2.1
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs#pragma ident "%Z%%M% %I% %E% SMI"
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * The interfaces in this file comprise a means of keeping track of devices
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * that we have already seen and those that have gone missing. This allows
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * us to quickly determine if we need to probe the device and quickly search
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs * for devices that are no longer available.
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobstypedef struct {
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobsdevice_remove_if_stale(gpointer key, gpointer value, gpointer user_data)
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs HAL_DEBUG(("test stale: %s (%d > %d)", name, args->timestamp, *val));
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs udi = libhal_manager_find_device_string_match(args->ctx,
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs for (i = 0; i < num; i++) {
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobsscan_for_stale_devices(LibHalContext *ctx, time_t timestamp)
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs g_hash_table_foreach_remove(seen, device_remove_if_stale, args);
4e9cfc9a015e8ca7d41f7d018c74dc8a692305b3jacobs seen = g_hash_table_new_full(g_str_hash, g_str_equal,