#include <glib.h>

#include <gio/gio.h>

int
main ()
{
sleep(5);
	GVolumeMonitor *monitor;
	GList *volumes;
	GList *iter;

	g_type_init();
	monitor = g_volume_monitor_get ();
	volumes = g_volume_monitor_get_volumes (monitor);

	for (iter = volumes; iter; iter = iter->next) {
		gchar *device_path;
		GVolume *tmp;

		tmp = iter->data;
		device_path = g_volume_get_identifier (tmp, G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE);
		g_debug ("Found volume %s", device_path);

		g_free (device_path);
	}
	g_list_foreach (volumes, (GFunc) g_object_unref, NULL);
	g_list_free (volumes);
}
