summaryrefslogtreecommitdiff
path: root/gio/gvolume.h
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-07-05 21:59:38 -0400
committerMatthias Clasen <mclasen@redhat.com>2009-07-05 21:59:38 -0400
commit99a1c47343d09ab0485c2377e5c8c53e847d84dd (patch)
tree93dba99fbd34d3780945eec38207273fd529d3dc /gio/gvolume.h
parentc85ff0c75004736d5c8798e3b47a47e0fc67ac70 (diff)
downloadglib-99a1c47343d09ab0485c2377e5c8c53e847d84dd.tar.gz
Allow interaction when unmounting mounts
For details, see bug 587482. The new api: - Provide new _with_operation() variants of all unmount and eject methods - Add GMountOperation::show-processes signal - this can be used to show processes blocking an unmount operation - Deprecate all unmount and eject methods - Add g_drive_can_start_degraded() method - this is to avoid auto-starting degraded drives - Make g_drive_stop() resp. g_file_stop_mountable() take a GMountOperation - these ops were recently added and not yet public API so it's fine to change how they work - Provide a way to poll mountable files, e.g. g_file_poll_mountable() - Add some missing file attributes for mountable files - G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE - needed for the GDU Nautilus extensions to format a volume - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED: - mimics g_drive_can_start_degraded() - G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL: - mimics g_drive_can_poll_for_media() - G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC - mimics g_drive_is_media_check_automatic()
Diffstat (limited to 'gio/gvolume.h')
-rw-r--r--gio/gvolume.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gio/gvolume.h b/gio/gvolume.h
index f81faad2e..5496d26c4 100644
--- a/gio/gvolume.h
+++ b/gio/gvolume.h
@@ -99,6 +99,8 @@ G_BEGIN_DECLS
* @should_automount: Returns %TRUE if the #GVolume should be automatically mounted.
* @get_activation_root: Returns the activation root for the #GVolume if it is known in advance or %NULL if
* it is not known.
+ * @eject_with_operation: Starts ejecting a #GVolume using a #GMountOperation. Since 2.22.
+ * @eject_with_operation_finish: Finishes an eject operation using a #GMountOperation. Since 2.22.
*
* Interface for implementing operations for mountable volumes.
**/
@@ -148,6 +150,15 @@ struct _GVolumeIface
GFile * (* get_activation_root) (GVolume *volume);
+ void (* eject_with_operation) (GVolume *volume,
+ GMountUnmountFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+ gboolean (* eject_with_operation_finish) (GVolume *volume,
+ GAsyncResult *result,
+ GError **error);
};
GType g_volume_get_type (void) G_GNUC_CONST;
@@ -169,6 +180,7 @@ void g_volume_mount (GVolume *volume,
gboolean g_volume_mount_finish (GVolume *volume,
GAsyncResult *result,
GError **error);
+#ifndef G_DISABLE_DEPRECATED
void g_volume_eject (GVolume *volume,
GMountUnmountFlags flags,
GCancellable *cancellable,
@@ -177,12 +189,23 @@ void g_volume_eject (GVolume *volume,
gboolean g_volume_eject_finish (GVolume *volume,
GAsyncResult *result,
GError **error);
+#endif
char * g_volume_get_identifier (GVolume *volume,
const char *kind);
char ** g_volume_enumerate_identifiers (GVolume *volume);
GFile * g_volume_get_activation_root (GVolume *volume);
+void g_volume_eject_with_operation (GVolume *volume,
+ GMountUnmountFlags flags,
+ GMountOperation *mount_operation,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+gboolean g_volume_eject_with_operation_finish (GVolume *volume,
+ GAsyncResult *result,
+ GError **error);
+
G_END_DECLS
#endif /* __G_VOLUME_H__ */