summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 18:22:46 +0100
committerGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 18:22:46 +0100
commite919d47c2430451b436cec955e9b99237f97028c (patch)
tree8a2d49e4eb54b8681f65a8e8cb170a534bcfedac /gio
parent5a614df9c5507d67f240462f7bf71b4cd411addf (diff)
downloadpygobject-e919d47c2430451b436cec955e9b99237f97028c.tar.gz
pygobject-e919d47c2430451b436cec955e9b99237f97028c.tar.xz
pygobject-e919d47c2430451b436cec955e9b99237f97028c.zip
Wrap File.unmount_mountable_with_operation()
Diffstat (limited to 'gio')
-rw-r--r--gio/gfile.override54
1 files changed, 54 insertions, 0 deletions
diff --git a/gio/gfile.override b/gio/gfile.override
index 5815134..f793ef8 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -457,6 +457,60 @@ _wrap_g_file_unmount_mountable(PyGObject *self,
return NULL;
}
%%
+override g_file_unmount_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_unmount_mountable_with_operation(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags", "mount_operation",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyObject *py_flags = NULL;
+ PyGObject *mount_operation;
+ PyGObject *py_cancellable = NULL;
+ GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOOO:File.unmount_mountable_with_operation",
+ kwlist,
+ &notify->callback,
+ &py_flags,
+ &mount_operation,
+ &py_cancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_unmount_mountable_with_operation(G_FILE(self->obj),
+ flags,
+ G_MOUNT_OPERATION(mount_operation->obj),
+ cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
+%%
override g_file_mount_enclosing_volume kwargs
static PyObject *
_wrap_g_file_mount_enclosing_volume(PyGObject *self,