Commit e3fdcd1f authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Added GMountMountFlags enum and added a flags argument to all mount calls.

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.


svn path=/trunk/; revision=6497
parent 52e49aee
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:
......
......@@ -3277,6 +3277,7 @@ g_file_set_attribute_int64 (GFile *file,
/**
* 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.
......@@ -3295,6 +3296,7 @@ g_file_set_attribute_int64 (GFile *file,
**/
void
g_file_mount_mountable (GFile *file,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -3315,6 +3317,7 @@ g_file_mount_mountable (GFile *file,
_("Operation not supported"));
(* iface->mount_mountable) (file,
flags,
mount_operation,
cancellable,
callback,
......@@ -4491,6 +4494,7 @@ g_file_new_for_commandline_arg (const char *arg)
/**
* 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.
......@@ -4508,6 +4512,7 @@ g_file_new_for_commandline_arg (const char *arg)
**/
void
g_file_mount_enclosing_volume (GFile *location,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -4529,7 +4534,7 @@ g_file_mount_enclosing_volume (GFile *location,
return;
}
(* iface->mount_enclosing_volume) (location, mount_operation, cancellable, callback, user_data);
(* iface->mount_enclosing_volume) (location, flags, mount_operation, cancellable, callback, user_data);
}
......
......@@ -67,13 +67,25 @@ typedef enum {
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,
......@@ -493,6 +505,7 @@ struct _GFileIface
void (*mount_mountable) (GFile *file,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -519,6 +532,7 @@ struct _GFileIface
void (*mount_enclosing_volume) (GFile *location,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -788,6 +802,7 @@ gboolean g_file_set_attribute_int64 (GFile
GCancellable *cancellable,
GError **error);
void g_file_mount_enclosing_volume (GFile *location,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -796,6 +811,7 @@ gboolean g_file_mount_enclosing_volume_finish (GFile
GAsyncResult *result,
GError **error);
void g_file_mount_mountable (GFile *file,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......
......@@ -454,6 +454,7 @@ g_mount_eject_finish (GMount *mount,
/**
* 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.
......@@ -471,6 +472,7 @@ g_mount_eject_finish (GMount *mount,
**/
void
g_mount_remount (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -492,7 +494,7 @@ g_mount_remount (GMount *mount,
return;
}
(* iface->remount) (mount, mount_operation, cancellable, callback, user_data);
(* iface->remount) (mount, flags, mount_operation, cancellable, callback, user_data);
}
/**
......
......@@ -113,6 +113,7 @@ struct _GMountIface
GAsyncResult *result,
GError **error);
void (*remount) (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -149,6 +150,7 @@ gboolean g_mount_eject_finish (GMount *mount,
GAsyncResult *result,
GError **error);
void g_mount_remount (GMount *mount,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......
......@@ -328,6 +328,7 @@ g_volume_should_automount (GVolume *volume)
/**
* 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.
......@@ -337,6 +338,7 @@ g_volume_should_automount (GVolume *volume)
**/
void
g_volume_mount (GVolume *volume,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -357,7 +359,7 @@ g_volume_mount (GVolume *volume,
return;
}
(* iface->mount_fn) (volume, mount_operation, cancellable, callback, user_data);
(* iface->mount_fn) (volume, flags, mount_operation, cancellable, callback, user_data);
}
/**
......
......@@ -120,6 +120,7 @@ struct _GVolumeIface
gboolean (*can_mount) (GVolume *volume);
gboolean (*can_eject) (GVolume *volume);
void (*mount_fn) (GVolume *volume,
GMountMountFlags flags,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
......@@ -155,6 +156,7 @@ gboolean g_volume_can_mount (GVolume *volume);
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment