Author: jjongsma Date: Tue Feb 12 04:06:09 2008 New Revision: 595 URL: http://svn.gnome.org/viewvc/glibmm?rev=595&view=rev
Log: * gio/src/file.ccg: * gio/src/file.hg: * gio/src/gio_enums.defs: * gio/src/gio_vfuncs.defs: * gio/src/mount.ccg: * gio/src/mount.hg: * gio/src/volume.ccg: * gio/src/volume.hg: * tools/m4/convert_gio.m4: update to match new gio API which adds a GMountMountFlags argument to all mount operations Modified: trunk/ChangeLog trunk/gio/src/file.ccg trunk/gio/src/file.hg trunk/gio/src/gio_enums.defs trunk/gio/src/gio_vfuncs.defs trunk/gio/src/mount.ccg trunk/gio/src/mount.hg trunk/gio/src/volume.ccg trunk/gio/src/volume.hg trunk/tools/m4/convert_gio.m4 Modified: trunk/gio/src/file.ccg ============================================================================== --- trunk/gio/src/file.ccg (original) +++ trunk/gio/src/file.ccg Tue Feb 12 04:06:09 2008 @@ -998,7 +998,7 @@ } -void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1006,13 +1006,14 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_mountable(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } -void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot) +void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1020,13 +1021,14 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_mountable(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), NULL, &SignalProxy_async_callback, slot_copy); } -void File::mount_mountable(const SlotAsyncReady& slot) +void File::mount_mountable(const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1034,15 +1036,17 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_mountable(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, &SignalProxy_async_callback, slot_copy); } -void File::mount_mountable() +void File::mount_mountable(MountMountFlags flags) { g_file_mount_mountable(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, NULL, @@ -1088,7 +1092,7 @@ NULL); } -void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1096,13 +1100,14 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_enclosing_volume(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } -void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot) +void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1110,13 +1115,14 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_enclosing_volume(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), NULL, &SignalProxy_async_callback, slot_copy); } -void File::mount_enclosing_volume(const SlotAsyncReady& slot) +void File::mount_enclosing_volume(const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -1124,15 +1130,17 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_mount_enclosing_volume(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, &SignalProxy_async_callback, slot_copy); } -void File::mount_enclosing_volume() +void File::mount_enclosing_volume(MountMountFlags flags) { g_file_mount_enclosing_volume(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, NULL, Modified: trunk/gio/src/file.hg ============================================================================== --- trunk/gio/src/file.hg (original) +++ trunk/gio/src/file.hg Tue Feb 12 04:06:09 2008 @@ -48,6 +48,7 @@ _WRAP_ENUM(FileCopyFlags, GFileCopyFlags, NO_GTYPE) _WRAP_ENUM(FileMonitorFlags, GFileMonitorFlags, NO_GTYPE) _WRAP_ENUM(MountUnmountFlags, GMountUnmountFlags, NO_GTYPE) +_WRAP_ENUM(MountMountFlags, GMountMountFlags, NO_GTYPE) /** File and directory handling. * Gio::File is a high level abstraction for manipulating files on a virtual file system. Gio::Files are lightweight, immutable objects that do no @@ -1345,7 +1346,7 @@ * @param slot A callback slot which will be called when the request is satisfied. * @param cancellable A Cancellable object. */ - void mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable); + void mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Starts a @mount_operation, mounting the volume that contains the file. * @@ -1355,7 +1356,7 @@ * @param mount_operation A MountOperation. * @param slot A callback slot which will be called when the request is satisfied. */ - void mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot); + void mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Starts a @mount_operation, mounting the volume that contains the file. * @@ -1364,13 +1365,13 @@ * * @param slot A callback slot which will be called when the request is satisfied. */ - void mount_enclosing_volume(const SlotAsyncReady& slot); + void mount_enclosing_volume(const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); _IGNORE(g_file_mount_enclosing_volume) /** Starts a @mount_operation, mounting the volume that contains the file. * */ - void mount_enclosing_volume(); + void mount_enclosing_volume(MountMountFlags flags = MOUNT_MOUNT_NONE); _IGNORE(g_file_mount_enclosing _volume) _WRAP_METHOD(bool mount_enclosing_volume_finish(const Glib::RefPtr<AsyncResult>& result), @@ -1389,7 +1390,7 @@ * @param cancellable A Cancellable object which can be used to cancel the operation. * @param slot A callback slot which will be called when the request is satisfied. */ - void mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable); + void mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a file of type FILE_TYPE_MOUNTABLE. Using @a mount_operation, you can request callbacks when, for instance, * passwords are needed during authentication. @@ -1399,7 +1400,7 @@ * @param mount_operation A MountOperation. * @param slot A callback slot which will be called when the request is satisfied. */ - void mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot); + void mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a file of type FILE_TYPE_MOUNTABLE without user interaction. * @@ -1407,11 +1408,11 @@ * * @param slot A callback slot which will be called when the request is satisfied. */ - void mount_mountable(const SlotAsyncReady& slot); + void mount_mountable(const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a file of type FILE_TYPE_MOUNTABLE without user interaction. */ - void mount_mountable(); + void mount_mountable(MountMountFlags flags = MOUNT_MOUNT_NONE); _IGNORE(g_file_mount_mountable) _WRAP_METHOD(Glib::RefPtr<File> mount_mountable_finish(const Glib::RefPtr<AsyncResult>& result), Modified: trunk/gio/src/gio_enums.defs ============================================================================== --- trunk/gio/src/gio_enums.defs (original) +++ trunk/gio/src/gio_enums.defs Tue Feb 12 04:06:09 2008 @@ -1,4 +1,4 @@ -;; From /home/marko/prefix/include/glib-2.0/gio/gappinfo.h +;; From /opt/gnome2/include/glib-2.0/gio/gappinfo.h (define-flags-extended AppInfoCreateFlags (in-module "G") @@ -10,7 +10,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gdatainputstream.h +;; From /opt/gnome2/include/glib-2.0/gio/gdatainputstream.h (define-enum-extended DataStreamByteOrder (in-module "G") @@ -33,7 +33,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfileattribute.h +;; From /opt/gnome2/include/glib-2.0/gio/gfileattribute.h (define-enum-extended FileAttributeType (in-module "G") @@ -71,7 +71,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfile.h +;; From /opt/gnome2/include/glib-2.0/gio/gfile.h (define-flags-extended FileQueryInfoFlags (in-module "G") @@ -91,6 +91,14 @@ ) ) +(define-enum-extended MountMountFlags + (in-module "G") + (c-name "GMountMountFlags") + (values + '("e" "G_MOUNT_MOUNT_NONE" "0") + ) +) + (define-flags-extended MountUnmountFlags (in-module "G") (c-name "GMountUnmountFlags") @@ -122,7 +130,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfileinfo.h +;; From /opt/gnome2/include/glib-2.0/gio/gfileinfo.h (define-enum-extended FileType (in-module "G") @@ -138,7 +146,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gfilemonitor.h +;; From /opt/gnome2/include/glib-2.0/gio/gfilemonitor.h (define-enum-extended FileMonitorEvent (in-module "G") @@ -154,7 +162,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gioerror.h +;; From /opt/gnome2/include/glib-2.0/gio/gioerror.h (define-enum-extended IOErrorEnum (in-module "G") @@ -194,7 +202,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/gmountoperation.h +;; From /opt/gnome2/include/glib-2.0/gio/gmountoperation.h (define-flags-extended AskPasswordFlags (in-module "G") @@ -228,7 +236,7 @@ ) ) -;; From /home/marko/prefix/include/glib-2.0/gio/goutputstream.h +;; From /opt/gnome2/include/glib-2.0/gio/goutputstream.h (define-flags-extended OutputStreamSpliceFlags (in-module "G") Modified: trunk/gio/src/gio_vfuncs.defs ============================================================================== --- trunk/gio/src/gio_vfuncs.defs (original) +++ trunk/gio/src/gio_vfuncs.defs Tue Feb 12 04:06:09 2008 @@ -351,6 +351,7 @@ (of-object "GVolume") (return-type "void") (parameters + '("GMountMountFlags" "flags") '("GMountOperation*" "mount_operation") '("GCancellable*" "cancellable") '("GAsyncReadyCallback" "callback") Modified: trunk/gio/src/mount.ccg ============================================================================== --- trunk/gio/src/mount.ccg (original) +++ trunk/gio/src/mount.ccg Tue Feb 12 04:06:09 2008 @@ -63,7 +63,7 @@ } -void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -71,13 +71,14 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_mount_remount(gobj(), + static_cast<GMountMountFlags>(flags), operation->gobj(), cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } -void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot) +void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -85,24 +86,27 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_mount_remount(gobj(), + static_cast<GMountMountFlags>(flags), operation->gobj(), NULL, &SignalProxy_async_callback, slot_copy); } -void Mount::remount(const Glib::RefPtr<MountOperation>& operation) +void Mount::remount(const Glib::RefPtr<MountOperation>& operation, MountMountFlags flags) { g_mount_remount(gobj(), + static_cast<GMountMountFlags>(flags), operation->gobj(), NULL, NULL, NULL); } -void Mount::remount() +void Mount::remount(MountMountFlags flags) { g_mount_remount(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, NULL, Modified: trunk/gio/src/mount.hg ============================================================================== --- trunk/gio/src/mount.hg (original) +++ trunk/gio/src/mount.hg Tue Feb 12 04:06:09 2008 @@ -103,7 +103,7 @@ * @param slot A callback which will be called when the operation is completed or canceled. * @param cancellable A cancellable object which can be used to cancel the operation. */ - void remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable); + void remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Remounts a mount. * This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot. @@ -115,7 +115,7 @@ * @param operation A mount operation. * @param slot A callback which will be called when the operation is completed or canceled. */ - void remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot); + void remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Remounts a mount. * @@ -125,7 +125,7 @@ * * @param operation A mount operation. */ - void remount(const Glib::RefPtr<MountOperation>& operation); + void remount(const Glib::RefPtr<MountOperation>& operation, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Remounts a mount, without user interaction. * @@ -133,7 +133,7 @@ * to take affect. While this is semantically equivalent with unmounting and then remounting, not all backends might need to * actually be unmounted. */ - void remount(); + void remount(MountMountFlags flags = MOUNT_MOUNT_NONE); _IGNORE(g_mount_remount) Modified: trunk/gio/src/volume.ccg ============================================================================== --- trunk/gio/src/volume.ccg (original) +++ trunk/gio/src/volume.ccg Tue Feb 12 04:06:09 2008 @@ -28,7 +28,7 @@ namespace Gio { void -Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable) +Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -36,6 +36,7 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_volume_mount(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), cancellable->gobj(), &SignalProxy_async_callback, @@ -44,7 +45,7 @@ } void -Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot) +Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -52,6 +53,7 @@ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_volume_mount(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), NULL, // cancellable &SignalProxy_async_callback, @@ -59,9 +61,10 @@ } void -Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation) +Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, MountMountFlags flags) { g_volume_mount(gobj(), + static_cast<GMountMountFlags>(flags), mount_operation->gobj(), NULL, // cancellable NULL, @@ -69,9 +72,10 @@ } void -Volume::mount() +Volume::mount(MountMountFlags flags) { g_volume_mount(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, // cancellable NULL, Modified: trunk/gio/src/volume.hg ============================================================================== --- trunk/gio/src/volume.hg (original) +++ trunk/gio/src/volume.hg Tue Feb 12 04:06:09 2008 @@ -90,7 +90,7 @@ * @param cancellable A cancellable object which can be used to cancel the operation. * @param mount_operation A mount operation. */ - void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable); + void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a volume. * This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot. @@ -98,17 +98,17 @@ * @param slot A callback which will be called when the operation is completed or canceled. * @param mount_operation A mount operation. */ - void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot); + void mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a volume. * * @param mount_operation A mount operation. */ - void mount(const Glib::RefPtr<MountOperation>& mount_operation); + void mount(const Glib::RefPtr<MountOperation>& mount_operation, MountMountFlags flags = MOUNT_MOUNT_NONE); /** Mounts a volume. */ - void mount(); + void mount(MountMountFlags flags = MOUNT_MOUNT_NONE); _IGNORE(g_volume_mount) @@ -167,7 +167,7 @@ _WRAP_VFUNC(bool can_mount(), can_mount) _WRAP_VFUNC(bool can_eject(), can_eject) - _WRAP_VFUNC(void mount_fn(GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data), mount_fn) //TODO: Rename to mount()? + _WRAP_VFUNC(void mount_fn(GMountMountFlags flags, GMountOperation* mount_operation, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data), mount_fn) //TODO: Rename to mount()? _WRAP_VFUNC(bool mount_finish(GAsyncResult* result, GError** error), mount_finish) _WRAP_VFUNC(void eject(GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data), eject) _WRAP_VFUNC(bool eject_finish(GAsyncResult* result, GError** error), eject_finish) Modified: trunk/tools/m4/convert_gio.m4 ============================================================================== --- trunk/tools/m4/convert_gio.m4 (original) +++ trunk/tools/m4/convert_gio.m4 Tue Feb 12 04:06:09 2008 @@ -2,6 +2,7 @@ _CONV_ENUM(G,AskPasswordFlags) _CONV_ENUM(G,MountOperationResult) _CONV_ENUM(G,MountUnmountFlags) +_CONV_ENUM(G,MountMountFlags) _CONV_ENUM(G,FileAttributeType) _CONV_ENUM(G,FileAttributeInfoFlags) _CONV_ENUM(G,FileCopyFlags) _______________________________________________ SVN-commits-list mailing list (read only) http://mail.gnome.org/mailman/listinfo/svn-commits-list Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want. Module maintainer? It is possible to set the reply-to to your development mailing list. Email [EMAIL PROTECTED] if interested.