summaryrefslogtreecommitdiff
path: root/gio/src/volume.ccg
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon@quotidian.org>2009-07-09 22:51:04 +0100
committerJonathon Jongsma <jonathon@quotidian.org>2009-07-09 23:04:36 +0100
commit5b120b5592c1176d703f9ae3f6c60d29f2d112fc (patch)
tree20e156e709246fbcdb9c7f58eb92bcfa03353db5 /gio/src/volume.ccg
parent12c751cd19e1d16e4cf7a3bc141040268d2ac98e (diff)
downloadglibmm-5b120b5592c1176d703f9ae3f6c60d29f2d112fc.tar.gz
implement Gio::Volume::eject_with_operation()
* gio/src/volume.ccg: * gio/src/volume.hg: implement eject_with_operation() similarly to the GDrive methods mentioned below
Diffstat (limited to 'gio/src/volume.ccg')
-rw-r--r--gio/src/volume.ccg73
1 files changed, 58 insertions, 15 deletions
diff --git a/gio/src/volume.ccg b/gio/src/volume.ccg
index 1e7d0931..3bdd9574 100644
--- a/gio/src/volume.ccg
+++ b/gio/src/volume.ccg
@@ -90,11 +90,12 @@ void Volume::eject(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>&
// and deleted in the callback.
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
- g_volume_eject(gobj(),
- static_cast<GMountUnmountFlags>(flags),
- cancellable->gobj(),
- &SignalProxy_async_callback,
- slot_copy);
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ 0, // mount_operation
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
}
void Volume::eject(const SlotAsyncReady& slot, MountUnmountFlags flags)
@@ -104,20 +105,62 @@ void Volume::eject(const SlotAsyncReady& slot, MountUnmountFlags flags)
// and deleted in the callback.
SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
- g_volume_eject(gobj(),
- static_cast<GMountUnmountFlags>(flags),
- NULL,
- &SignalProxy_async_callback,
- slot_copy);
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ 0, // mount_operation
+ 0, // cancellable
+ &SignalProxy_async_callback,
+ slot_copy);
}
void Volume::eject(MountUnmountFlags flags)
{
- g_volume_eject(gobj(),
- static_cast<GMountUnmountFlags>(flags),
- NULL,
- NULL,
- NULL);
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ 0, // mount_operation
+ 0, // cancellable
+ 0, // callback
+ 0); // data
+}
+
+void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, MountUnmountFlags flags)
+{
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ mount_operation->gobj(),
+ cancellable->gobj(),
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot, MountUnmountFlags flags)
+{
+ // Create a copy of the slot.
+ // A pointer to it will be passed through the callback's data parameter
+ // and deleted in the callback.
+ SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
+
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ mount_operation->gobj(),
+ 0, // cancellable
+ &SignalProxy_async_callback,
+ slot_copy);
+}
+
+void Volume::eject(const Glib::RefPtr<MountOperation>& mount_operation, MountUnmountFlags flags)
+{
+ g_volume_eject_with_operation(gobj(),
+ static_cast<GMountUnmountFlags>(flags),
+ mount_operation->gobj(),
+ 0, // cancellable
+ 0, // callback
+ 0); // data
}
} // namespace Gio