#include <glib.h>
#include <gio/gio.h>

int main (int argc, char **argv)
{
	GVolumeMonitor *gmonitor;
	GList *iter;
	GList *drives;
	GList *volumes;

	g_type_init ();

	g_message ("Probing drives and media");

	gmonitor = g_volume_monitor_get ();

	drives = g_volume_monitor_get_connected_drives (gmonitor);

	g_message ("Found %d drives", g_list_length (drives));

	g_list_foreach (drives, (GFunc) g_object_unref, NULL);
	g_list_free (drives);

	volumes = g_volume_monitor_get_volumes (gmonitor);
	g_message ("Found %d volumes", g_list_length (volumes));

	g_list_foreach (volumes, (GFunc) g_object_unref, NULL);
	g_list_free (volumes);

	return 0;
}
