glib r6497 - trunk/gio



Author: alexl
Date: Mon Feb 11 11:12:36 2008
New Revision: 6497
URL: http://svn.gnome.org/viewvc/glib?rev=6497&view=rev

Log:
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.



Modified:
   trunk/gio/ChangeLog
   trunk/gio/gfile.c
   trunk/gio/gfile.h
   trunk/gio/gmount.c
   trunk/gio/gmount.h
   trunk/gio/gvolume.c
   trunk/gio/gvolume.h

Modified: trunk/gio/gfile.c
==============================================================================
--- trunk/gio/gfile.c	(original)
+++ trunk/gio/gfile.c	Mon Feb 11 11:12:36 2008
@@ -3277,6 +3277,7 @@
 /**
  * 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 @@
  **/
 void
 g_file_mount_mountable (GFile               *file,
+			GMountMountFlags     flags,
 			GMountOperation     *mount_operation,
 			GCancellable        *cancellable,
 			GAsyncReadyCallback  callback,
@@ -3315,6 +3317,7 @@
 					 _("Operation not supported"));
   
   (* iface->mount_mountable) (file,
+			      flags,
 			      mount_operation,
 			      cancellable,
 			      callback,
@@ -4491,6 +4494,7 @@
 /**
  * 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 @@
  **/
 void
 g_file_mount_enclosing_volume (GFile               *location,
+			       GMountMountFlags     flags,
 			       GMountOperation     *mount_operation,
 			       GCancellable        *cancellable,
 			       GAsyncReadyCallback  callback,
@@ -4529,7 +4534,7 @@
       return;
     }
   
-  (* iface->mount_enclosing_volume) (location, mount_operation, cancellable, callback, user_data);
+  (* iface->mount_enclosing_volume) (location, flags, mount_operation, cancellable, callback, user_data);
 
 }
 

Modified: trunk/gio/gfile.h
==============================================================================
--- trunk/gio/gfile.h	(original)
+++ trunk/gio/gfile.h	Mon Feb 11 11:12:36 2008
@@ -67,13 +67,25 @@
   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 @@
 
 
   void                (*mount_mountable)           (GFile               *file,
+						    GMountMountFlags     flags,
 						    GMountOperation     *mount_operation,
 						    GCancellable         *cancellable,
 						    GAsyncReadyCallback  callback,
@@ -519,6 +532,7 @@
 
 
   void     (*mount_enclosing_volume)        (GFile *location,
+					     GMountMountFlags flags,
 					     GMountOperation *mount_operation,
 					     GCancellable *cancellable,
 					     GAsyncReadyCallback callback,
@@ -788,6 +802,7 @@
 							   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 @@
 							   GAsyncResult               *result,
 							   GError                    **error);
 void                    g_file_mount_mountable            (GFile                      *file,
+							   GMountMountFlags            flags,
 							   GMountOperation            *mount_operation,
 							   GCancellable               *cancellable,
 							   GAsyncReadyCallback         callback,

Modified: trunk/gio/gmount.c
==============================================================================
--- trunk/gio/gmount.c	(original)
+++ trunk/gio/gmount.c	Mon Feb 11 11:12:36 2008
@@ -454,6 +454,7 @@
 /**
  * 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 @@
  **/
 void
 g_mount_remount (GMount *mount,
+                 GMountMountFlags flags,
                  GMountOperation *mount_operation,
                  GCancellable *cancellable,
                  GAsyncReadyCallback callback,
@@ -492,7 +494,7 @@
       return;
     }
   
-  (* iface->remount) (mount, mount_operation, cancellable, callback, user_data);
+  (* iface->remount) (mount, flags, mount_operation, cancellable, callback, user_data);
 }
 
 /**

Modified: trunk/gio/gmount.h
==============================================================================
--- trunk/gio/gmount.h	(original)
+++ trunk/gio/gmount.h	Mon Feb 11 11:12:36 2008
@@ -113,6 +113,7 @@
                                               GAsyncResult    *result,
                                               GError         **error);
   void               (*remount)              (GMount         *mount,
+					      GMountMountFlags     flags,
 					      GMountOperation     *mount_operation,
                                               GCancellable    *cancellable,
                                               GAsyncReadyCallback callback,
@@ -149,6 +150,7 @@
                                                  GAsyncResult        *result,
                                                  GError             **error);
 void               g_mount_remount              (GMount              *mount,
+						 GMountMountFlags     flags,
 						 GMountOperation     *mount_operation,
                                                  GCancellable        *cancellable,
                                                  GAsyncReadyCallback  callback,

Modified: trunk/gio/gvolume.c
==============================================================================
--- trunk/gio/gvolume.c	(original)
+++ trunk/gio/gvolume.c	Mon Feb 11 11:12:36 2008
@@ -328,6 +328,7 @@
 /**
  * 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 @@
  **/
 void
 g_volume_mount (GVolume    *volume,
+		GMountMountFlags     flags,
                 GMountOperation     *mount_operation,
                 GCancellable        *cancellable,
                 GAsyncReadyCallback  callback,
@@ -357,7 +359,7 @@
       return;
     }
   
-  (* iface->mount_fn) (volume, mount_operation, cancellable, callback, user_data);
+  (* iface->mount_fn) (volume, flags, mount_operation, cancellable, callback, user_data);
 }
 
 /**

Modified: trunk/gio/gvolume.h
==============================================================================
--- trunk/gio/gvolume.h	(original)
+++ trunk/gio/gvolume.h	Mon Feb 11 11:12:36 2008
@@ -120,6 +120,7 @@
   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_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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]