Esempio n. 1
0
static GList *
get_volumes (GVolumeMonitor *volume_monitor)
{
  GUnixVolumeMonitor *monitor;
  GList *l;
  
  monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);

  l = g_list_copy (monitor->volumes);
  g_list_foreach (l, (GFunc)g_object_ref, NULL);

  return l;
}
Esempio n. 2
0
static void
g_unix_volume_monitor_dispose (GObject *object)
{
  GUnixVolumeMonitor *monitor;

  monitor = G_UNIX_VOLUME_MONITOR (object);

  g_list_free_full (monitor->volumes, g_object_unref);
  monitor->volumes = NULL;
  
  g_list_free_full (monitor->mounts, g_object_unref);
  monitor->mounts = NULL;
  
  G_OBJECT_CLASS (g_unix_volume_monitor_parent_class)->dispose (object);
}
Esempio n. 3
0
static void
g_unix_volume_monitor_finalize (GObject *object)
{
  GUnixVolumeMonitor *monitor;
  
  monitor = G_UNIX_VOLUME_MONITOR (object);

  g_signal_handlers_disconnect_by_func (monitor->mount_monitor, mountpoints_changed, monitor);
  g_signal_handlers_disconnect_by_func (monitor->mount_monitor, mounts_changed, monitor);
					
  g_object_unref (monitor->mount_monitor);

  g_list_free_full (monitor->last_mountpoints, (GDestroyNotify) g_unix_mount_point_free);
  g_list_free_full (monitor->last_mounts, (GDestroyNotify) g_unix_mount_free);

  g_list_free_full (monitor->volumes, g_object_unref);
  g_list_free_full (monitor->mounts, g_object_unref);

  G_OBJECT_CLASS (g_unix_volume_monitor_parent_class)->finalize (object);
}
Esempio n. 4
-1
static GList *
get_volumes (GVolumeMonitor *volume_monitor)
{
  GUnixVolumeMonitor *monitor;
  
  monitor = G_UNIX_VOLUME_MONITOR (volume_monitor);

  return g_list_copy_deep (monitor->volumes, (GCopyFunc) g_object_ref, NULL);
}