summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 17:00:26 +0100
committerGian Mario Tagliaretti <gianmt@gnome.org>2010-01-01 17:00:26 +0100
commit92662f129fc728258fd5e34f53dcb081e3715017 (patch)
treeba6f17a35623f2206e197a9eaf004d8bd8c7b054
parent99902b786500948c3278779841e4db54223b9256 (diff)
downloadpygobject-92662f129fc728258fd5e34f53dcb081e3715017.tar.gz
Wrap gio.File.poll_mountable()
-rw-r--r--gio/gfile.override41
1 files changed, 41 insertions, 0 deletions
diff --git a/gio/gfile.override b/gio/gfile.override
index 26f92bb3..6e84967f 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,
+ &notify->callback,
+ &pycancellable,
+ &notify->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** */