summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 20:21:05 +0100
committerGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 20:21:05 +0100
commit6f459786dd641cd49d81eba403d940620f961cab (patch)
tree09792329f53b070d9900519fcd5e12cf8ec18b86 /gio
parentd4b5d1b4839364e5676eb2da28f1d21db7e2552d (diff)
downloadpygobject-6f459786dd641cd49d81eba403d940620f961cab.tar.gz
pygobject-6f459786dd641cd49d81eba403d940620f961cab.tar.xz
pygobject-6f459786dd641cd49d81eba403d940620f961cab.zip
Wrap gio.Mount.eject_with_operation()
Diffstat (limited to 'gio')
-rw-r--r--gio/gmount.override54
1 files changed, 54 insertions, 0 deletions
diff --git a/gio/gmount.override b/gio/gmount.override
index 1d75c96..a663040 100644
--- a/gio/gmount.override
+++ b/gio/gmount.override
@@ -398,3 +398,57 @@ _wrap_g_mount_unmount_with_operation(PyGObject *self,
pygio_notify_free(notify);
return NULL;
}
+%%
+override g_mount_eject_with_operation kwargs
+static PyObject *
+_wrap_g_mount_eject_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:gio.Mount.eject_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_mount_eject_with_operation(G_MOUNT(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;
+}