+void
+unmount_cb (GFileMonitor *mon,
+ GFile *file,
+ GFile *other_file,
+ GFileMonitorEvent event,
+ gpointer udata)
+{
+ gchar *path = g_file_get_path(file);
+ gchar *uri = g_strconcat("file://", path, NULL);
+ g_free(path);
+
+ ListLock();
+
+ if (g_RegisterCallback.binding_device_removed &&
+ event == G_FILE_MONITOR_EVENT_DELETED) {
+ g_RegisterCallback.binding_device_removed(uri);
+ }
+
+ ListUnlock();
+ g_free(uri);
+}
+