X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgvolumemonitor.h;h=1ee3a7e20d4a7b635e060770721ab9b9c3002ae9;hb=4f775b7b7ff38581b110ce1664451381ca3d88b6;hp=18478fa77f1969d1c6baa3f742a685a660a0193c;hpb=f4add8f0faf4a8c2ca1cdb4f99f5f3d0d66aaff8;p=platform%2Fupstream%2Fglib.git
diff --git a/gio/gvolumemonitor.h b/gio/gvolumemonitor.h
index 18478fa..1ee3a7e 100644
--- a/gio/gvolumemonitor.h
+++ b/gio/gvolumemonitor.h
@@ -1,5 +1,7 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
/* GIO - GLib Input, Output and Streaming Library
- *
+ *
* Copyright (C) 2006-2007 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -13,25 +15,20 @@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see .
*
* Author: Alexander Larsson
* David Zeuthen
*/
+#ifndef __G_VOLUME_MONITOR_H__
+#define __G_VOLUME_MONITOR_H__
+
#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
#error "Only can be included directly."
#endif
-#ifndef __G_VOLUME_MONITOR_H__
-#define __G_VOLUME_MONITOR_H__
-
-#include
-#include
-#include
-#include
+#include
G_BEGIN_DECLS
@@ -43,60 +40,83 @@ G_BEGIN_DECLS
#define G_IS_VOLUME_MONITOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_VOLUME_MONITOR))
/**
+ * G_VOLUME_MONITOR_EXTENSION_POINT_NAME:
+ *
+ * Extension point for volume monitor functionality.
+ * See [Extending GIO][extending-gio].
+ */
+#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor"
+
+/**
* GVolumeMonitor:
- * @parent_instance: The parent instance.
*
* A Volume Monitor that watches for volume events.
**/
-typedef struct _GVolumeMonitor GVolumeMonitor;
typedef struct _GVolumeMonitorClass GVolumeMonitorClass;
-struct _GVolumeMonitor {
+struct _GVolumeMonitor
+{
GObject parent_instance;
/*< private >*/
gpointer priv;
};
-struct _GVolumeMonitorClass {
+struct _GVolumeMonitorClass
+{
GObjectClass parent_class;
/*< public >*/
/* signals */
- void (* volume_added) (GVolumeMonitor *volume_monitor,
- GVolume *volume);
- void (* volume_removed) (GVolumeMonitor *volume_monitor,
- GVolume *volume);
- void (* volume_changed) (GVolumeMonitor *volume_monitor,
- GVolume *volume);
-
- void (* mount_added) (GVolumeMonitor *volume_monitor,
- GMount *mount);
- void (* mount_removed) (GVolumeMonitor *volume_monitor,
- GMount *mount);
- void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor,
- GMount *mount);
- void (* mount_changed) (GVolumeMonitor *volume_monitor,
- GMount *mount);
-
- void (* drive_connected) (GVolumeMonitor *volume_monitor,
- GDrive *drive);
- void (* drive_disconnected) (GVolumeMonitor *volume_monitor,
- GDrive *drive);
- void (* drive_changed) (GVolumeMonitor *volume_monitor,
- GDrive *drive);
+ void (* volume_added) (GVolumeMonitor *volume_monitor,
+ GVolume *volume);
+ void (* volume_removed) (GVolumeMonitor *volume_monitor,
+ GVolume *volume);
+ void (* volume_changed) (GVolumeMonitor *volume_monitor,
+ GVolume *volume);
+
+ void (* mount_added) (GVolumeMonitor *volume_monitor,
+ GMount *mount);
+ void (* mount_removed) (GVolumeMonitor *volume_monitor,
+ GMount *mount);
+ void (* mount_pre_unmount) (GVolumeMonitor *volume_monitor,
+ GMount *mount);
+ void (* mount_changed) (GVolumeMonitor *volume_monitor,
+ GMount *mount);
+
+ void (* drive_connected) (GVolumeMonitor *volume_monitor,
+ GDrive *drive);
+ void (* drive_disconnected) (GVolumeMonitor *volume_monitor,
+ GDrive *drive);
+ void (* drive_changed) (GVolumeMonitor *volume_monitor,
+ GDrive *drive);
/* Vtable */
- GList * (*get_connected_drives) (GVolumeMonitor *volume_monitor);
- GList * (*get_volumes) (GVolumeMonitor *volume_monitor);
- GList * (*get_mounts) (GVolumeMonitor *volume_monitor);
+ gboolean (* is_supported) (void);
+
+ GList * (* get_connected_drives) (GVolumeMonitor *volume_monitor);
+ GList * (* get_volumes) (GVolumeMonitor *volume_monitor);
+ GList * (* get_mounts) (GVolumeMonitor *volume_monitor);
+
+ GVolume * (* get_volume_for_uuid) (GVolumeMonitor *volume_monitor,
+ const char *uuid);
- GVolume * (*get_volume_for_uuid) (GVolumeMonitor *volume_monitor,
- const char *uuid);
+ GMount * (* get_mount_for_uuid) (GVolumeMonitor *volume_monitor,
+ const char *uuid);
- GMount * (*get_mount_for_uuid) (GVolumeMonitor *volume_monitor,
- const char *uuid);
+
+ /* These arguments are unfortunately backwards by mistake (bug #520169). Deprecated in 2.20. */
+ GVolume * (* adopt_orphan_mount) (GMount *mount,
+ GVolumeMonitor *volume_monitor);
+
+ /* signal added in 2.17 */
+ void (* drive_eject_button) (GVolumeMonitor *volume_monitor,
+ GDrive *drive);
+
+ /* signal added in 2.21 */
+ void (* drive_stop_button) (GVolumeMonitor *volume_monitor,
+ GDrive *drive);
/*< private >*/
/* Padding for future expansion */
@@ -106,20 +126,28 @@ struct _GVolumeMonitorClass {
void (*_g_reserved4) (void);
void (*_g_reserved5) (void);
void (*_g_reserved6) (void);
- void (*_g_reserved7) (void);
- void (*_g_reserved8) (void);
};
-GType g_volume_monitor_get_type (void) G_GNUC_CONST;
-
-GVolumeMonitor *g_volume_monitor_get (void);
-GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
-GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor);
-GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor);
-GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
- const char *uuid);
-GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
- const char *uuid);
+GLIB_AVAILABLE_IN_ALL
+GType g_volume_monitor_get_type (void) G_GNUC_CONST;
+
+GLIB_AVAILABLE_IN_ALL
+GVolumeMonitor *g_volume_monitor_get (void);
+GLIB_AVAILABLE_IN_ALL
+GList * g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
+GLIB_AVAILABLE_IN_ALL
+GList * g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor);
+GLIB_AVAILABLE_IN_ALL
+GList * g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor);
+GLIB_AVAILABLE_IN_ALL
+GVolume * g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
+ const char *uuid);
+GLIB_AVAILABLE_IN_ALL
+GMount * g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
+ const char *uuid);
+
+GLIB_DEPRECATED
+GVolume * g_volume_monitor_adopt_orphan_mount (GMount *mount);
G_END_DECLS