summaryrefslogtreecommitdiff
path: root/gio/src/file.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2012-09-16 14:28:09 +0200
committerMurray Cumming <murrayc@murrayc.com>2012-09-16 14:28:09 +0200
commit84a47f5564c2da20514b14454fa049cbe5c13550 (patch)
tree4b238aed2ccebf5e35937e43487b4b11f98f3783 /gio/src/file.ccg
parentedca3b3b3da20baf9d79b4820a02bc15a08c207f (diff)
downloadglibmm-84a47f5564c2da20514b14454fa049cbe5c13550.tar.gz
File: Add remove_async() and remove_finish().
* gio/src/file.[hg|ccg]: As for the sync version, we rename delete to remove, because the sync vesion would be delete(), which uses a C++ keyword.
Diffstat (limited to 'gio/src/file.ccg')
-rw-r--r--gio/src/file.ccg35
1 files changed, 35 insertions, 0 deletions
diff --git a/gio/src/file.ccg b/gio/src/file.ccg
index a915a3af..04b1bf44 100644
--- a/gio/src/file.ccg
+++ b/gio/src/file.ccg
@@ -1839,4 +1839,39 @@ bool File::has_parent() const
}
+void
+File::remove_async(const SlotAsyncReady& slot_ready,
+ const Glib::RefPtr<Cancellable>& cancellable,
+ int io_priority)
+{
+ // Create copies of slots.
+ // Pointers to them will be passed through the callbacks' data parameter
+ // and deleted in the corresponding callback.
+ SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
+
+ g_file_delete_async(gobj(),
+ io_priority,
+ Glib::unwrap(cancellable),
+ &SignalProxy_async_callback,
+ slot_ready_copy);
+}
+
+void
+File::remove_async(const SlotAsyncReady& slot_ready,
+ int io_priority)
+{
+ // Create copies of slots.
+ // Pointers to them will be passed through the callbacks' data parameter
+ // and deleted in the corresponding callback.
+ SlotAsyncReady* slot_ready_copy = new SlotAsyncReady(slot_ready);
+
+ g_file_delete_async(gobj(),
+ io_priority,
+ 0,
+ &SignalProxy_async_callback,
+ slot_ready_copy);
+}
+
+
+
} // namespace Gio