From 38ef5073e1cb474779e82d2f4bda521ef2ef03fa Mon Sep 17 00:00:00 2001 From: Gian Mario Tagliaretti Date: Mon, 30 Mar 2009 20:07:53 +0000 Subject: Wrap new GFile method. 2009-03-30 Gian Mario Tagliaretti * gio/gfile.override: (_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method. svn path=/trunk/; revision=1047 --- ChangeLog | 5 +++++ gio/gfile.override | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f1f7b39..4c34565 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-03-30 Gian Mario Tagliaretti + + * gio/gfile.override: + (_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method. + 2009-03-30 Gian Mario Tagliaretti * gio/gfile.override: diff --git a/gio/gfile.override b/gio/gfile.override index 3169ae1..084462e 100644 --- a/gio/gfile.override +++ b/gio/gfile.override @@ -1328,8 +1328,53 @@ _wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs) pygio_notify_free(notify); return NULL; } +%% +override g_file_find_enclosing_mount_async kwargs +static PyObject * +_wrap_g_file_find_enclosing_mount_async(PyGObject *self, + PyObject *args, + PyObject *kwargs) +{ + static char *kwlist[] = { "callback", "io_priority", + "cancellable", "user_data", NULL }; + int io_priority = G_PRIORITY_DEFAULT; + PyGObject *pycancellable = NULL; + GCancellable *cancellable; + PyGIONotify *notify; + + notify = pygio_notify_new(); + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + "O|iOO:File.enclosing_mount_async", + kwlist, + ¬ify->callback, + &io_priority, + &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_find_enclosing_mount_async(G_FILE(self->obj), + io_priority, + cancellable, + (GAsyncReadyCallback)async_result_callback_marshal, + notify); + + Py_INCREF(Py_None); + return Py_None; + + error: + pygio_notify_free(notify); + return NULL; +} -/* GFile.find_enclosing_mount_async */ /* GFile.set_attributes_async */ /* GFile.set_display_name_async */ /* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */ -- cgit