[pygobject] Wrap gio.File.poll_mountable()
- From: Gian Mario Tagliaretti <gianmt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pygobject] Wrap gio.File.poll_mountable()
- Date: Fri, 1 Jan 2010 19:26:17 +0000 (UTC)
commit 92662f129fc728258fd5e34f53dcb081e3715017
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date: Fri Jan 1 17:00:26 2010 +0100
Wrap gio.File.poll_mountable()
gio/gfile.override | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/gio/gfile.override b/gio/gfile.override
index 26f92bb..6e84967 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -1735,6 +1735,47 @@ _wrap_g_file_set_display_name_async(PyGObject *self,
pygio_notify_free(notify);
return NULL;
}
+%%
+override g_file_poll_mountable kwargs
+static PyObject *
+_wrap_g_file_poll_mountable(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OO:File.poll_mountable",
+ kwlist,
+ ¬ify->callback,
+ &pycancellable,
+ ¬ify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_poll_mountable(G_FILE(self->obj), cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
/* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */
/* GFile.load_partial_contents_finish: No ArgType for char** */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]