2008-02-11 Alexander Larsson <alexl@redhat.com>
+ * gfile.[ch]:
+ * gmount.[ch]:
+ * gvolume.[ch]:
+ Added GMountMountFlags enum and added a flags
+ argument to all mount calls.
+
+ This is an API/ABI change for future extensibility,
+ as I think we will need at least an
+ inhibit-autorun flag (the panel needs this).
+ There are no flags defined yet though.
+
+2008-02-11 Alexander Larsson <alexl@redhat.com>
+
* gfileinfo.h:
Added new standard::description attribute.
Requested by Vincent, and useful for both
/**
* g_file_mount_mountable:
* @file: input #GFile.
+ * @flags: flags affecting the operation
* @mount_operation: a #GMountOperation, or %NULL to avoid user interaction.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
**/
void
g_file_mount_mountable (GFile *file,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
_("Operation not supported"));
(* iface->mount_mountable) (file,
+ flags,
mount_operation,
cancellable,
callback,
/**
* g_file_mount_enclosing_volume:
* @location: input #GFile.
+ * @flags: flags affecting the operation
* @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback to call when the request is satisfied, or %NULL.
**/
void
g_file_mount_enclosing_volume (GFile *location,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
return;
}
- (* iface->mount_enclosing_volume) (location, mount_operation, cancellable, callback, user_data);
+ (* iface->mount_enclosing_volume) (location, flags, mount_operation, cancellable, callback, user_data);
}
G_FILE_CREATE_PRIVATE = (1<<0)
} GFileCreateFlags;
+
+/**
+ * GMountMountFlags:
+ * @G_MOUNT_MOUNT_NONE: No flags set.
+ *
+ * Flags used when mounting a mount.
+ */
+typedef enum {
+ G_MOUNT_MOUNT_NONE = 0,
+} GMountMountFlags;
+
+
/**
* GMountUnmountFlags:
* @G_MOUNT_UNMOUNT_NONE: No flags set.
* @G_MOUNT_UNMOUNT_FORCE: Unmount even if there are outstanding
* file operations on the mount.
*
- * Flags used when an operation may create a file.
+ * Flags used when an unmounting a mount.
*/
typedef enum {
G_MOUNT_UNMOUNT_NONE = 0,
void (*mount_mountable) (GFile *file,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
void (*mount_enclosing_volume) (GFile *location,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
GCancellable *cancellable,
GError **error);
void g_file_mount_enclosing_volume (GFile *location,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
GAsyncResult *result,
GError **error);
void g_file_mount_mountable (GFile *file,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
/**
* g_mount_remount:
* @mount: a #GMount.
+ * @flags: flags affecting the operation
* @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback, or %NULL.
**/
void
g_mount_remount (GMount *mount,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
return;
}
- (* iface->remount) (mount, mount_operation, cancellable, callback, user_data);
+ (* iface->remount) (mount, flags, mount_operation, cancellable, callback, user_data);
}
/**
GAsyncResult *result,
GError **error);
void (*remount) (GMount *mount,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
GAsyncResult *result,
GError **error);
void g_mount_remount (GMount *mount,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
/**
* g_volume_mount:
* @volume: a #GVolume.
+ * @flags: flags affecting the operation
* @mount_operation: a #GMountOperation or %NULL to avoid user interaction.
* @cancellable: optional #GCancellable object, %NULL to ignore.
* @callback: a #GAsyncReadyCallback, or %NULL.
**/
void
g_volume_mount (GVolume *volume,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
return;
}
- (* iface->mount_fn) (volume, mount_operation, cancellable, callback, user_data);
+ (* iface->mount_fn) (volume, flags, mount_operation, cancellable, callback, user_data);
}
/**
gboolean (*can_mount) (GVolume *volume);
gboolean (*can_eject) (GVolume *volume);
void (*mount_fn) (GVolume *volume,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gboolean g_volume_can_eject (GVolume *volume);
gboolean g_volume_should_automount (GVolume *volume);
void g_volume_mount (GVolume *volume,
+ GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,