Added GMountMountFlags enum and added a flags argument to all mount calls.
authorAlexander Larsson <alexl@redhat.com>
Mon, 11 Feb 2008 11:12:36 +0000 (11:12 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Mon, 11 Feb 2008 11:12:36 +0000 (11:12 +0000)
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

gio/ChangeLog
gio/gfile.c
gio/gfile.h
gio/gmount.c
gio/gmount.h
gio/gvolume.c
gio/gvolume.h

index 40ec187..c47b55d 100644 (file)
@@ -1,5 +1,18 @@
 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
index cb9f60b..4a1ccb1 100644 (file)
@@ -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);
 
 }
 
index 0072224..84e5169 100644 (file)
@@ -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,
index 71fa51b..f39020f 100644 (file)
@@ -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);
 }
 
 /**
index 8681854..c2474d5 100644 (file)
@@ -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,
index 3aa174d..642ccd1 100644 (file)
@@ -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);
 }
 
 /**
index c462201..f1ec0f5 100644 (file)
@@ -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,