diff options
author | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-02-12 04:06:09 +0000 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@src.gnome.org> | 2008-02-12 04:06:09 +0000 |
commit | 376b6ff4acf2ff8a71ada8d65b5b922a8331d442 (patch) | |
tree | 344b7a7b98d64d9998ced252f749f5cd8e677933 /gio | |
parent | 4a263b53ec0492b1a35d4ba0ee46e88a65f648c1 (diff) | |
download | glibmm-376b6ff4acf2ff8a71ada8d65b5b922a8331d442.tar.gz |
update to match new gio API which adds a GMountMountFlags argument to all
* 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
svn path=/trunk/; revision=595
Diffstat (limited to 'gio')
-rw-r--r-- | gio/src/file.ccg | 24 | ||||
-rw-r--r-- | gio/src/file.hg | 17 | ||||
-rw-r--r-- | gio/src/gio_enums.defs | 26 | ||||
-rw-r--r-- | gio/src/gio_vfuncs.defs | 1 | ||||
-rw-r--r-- | gio/src/mount.ccg | 12 | ||||
-rw-r--r-- | gio/src/mount.hg | 8 | ||||
-rw-r--r-- | gio/src/volume.ccg | 12 | ||||
-rw-r--r-- | gio/src/volume.hg | 10 |
8 files changed, 68 insertions, 42 deletions
diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 4845ccf6..1a7424ac 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -998,7 +998,7 @@ bool File::set_attribute_int64(const std::string& attribute, gint64 value, FileQ } -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 @@ void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, 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 @@ void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, 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 @@ void File::mount_mountable(const SlotAsyncReady& slot) 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 @@ File::unmount_mountable(MountUnmountFlags flags) 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 @@ void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_oper 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 @@ void File::mount_enclosing_volume(const Glib::RefPtr<MountOperation>& mount_oper 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 @@ void File::mount_enclosing_volume(const SlotAsyncReady& slot) 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, diff --git a/gio/src/file.hg b/gio/src/file.hg index 7e4e72ad..599fcb19 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -48,6 +48,7 @@ _WRAP_ENUM(FileCreateFlags, GFileCreateFlags, NO_GTYPE) _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 @@ public: * @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 @@ public: * @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 @@ public: * * @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 @@ public: * @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 @@ public: * @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 @@ public: * * @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), diff --git a/gio/src/gio_enums.defs b/gio/src/gio_enums.defs index bce90d9e..00e5a4b2 100644 --- a/gio/src/gio_enums.defs +++ b/gio/src/gio_enums.defs @@ -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") diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs index 2cbcc171..49bd5f81 100644 --- a/gio/src/gio_vfuncs.defs +++ b/gio/src/gio_vfuncs.defs @@ -351,6 +351,7 @@ (of-object "GVolume") (return-type "void") (parameters + '("GMountMountFlags" "flags") '("GMountOperation*" "mount_operation") '("GCancellable*" "cancellable") '("GAsyncReadyCallback" "callback") diff --git a/gio/src/mount.ccg b/gio/src/mount.ccg index 845c69ca..378c4586 100644 --- a/gio/src/mount.ccg +++ b/gio/src/mount.ccg @@ -63,7 +63,7 @@ void Mount::unmount(MountUnmountFlags flags) } -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 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy 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 @@ void Mount::remount(const Glib::RefPtr<MountOperation>& operation, const SlotAsy 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, diff --git a/gio/src/mount.hg b/gio/src/mount.hg index 3abb72f6..5e72fc88 100644 --- a/gio/src/mount.hg +++ b/gio/src/mount.hg @@ -103,7 +103,7 @@ public: * @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 @@ public: * @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 @@ public: * * @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 @@ public: * 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) diff --git a/gio/src/volume.ccg b/gio/src/volume.ccg index 86dec05b..43eba665 100644 --- a/gio/src/volume.ccg +++ b/gio/src/volume.ccg @@ -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 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy 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 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy } 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 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy 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 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsy } 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 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation) } void -Volume::mount() +Volume::mount(MountMountFlags flags) { g_volume_mount(gobj(), + static_cast<GMountMountFlags>(flags), NULL, NULL, // cancellable NULL, diff --git a/gio/src/volume.hg b/gio/src/volume.hg index fc80ed65..e624f3eb 100644 --- a/gio/src/volume.hg +++ b/gio/src/volume.hg @@ -90,7 +90,7 @@ public: * @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 @@ public: * @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 @@ public: _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) |