diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-03-30 20:07:53 +0000 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2009-03-30 20:07:53 +0000 |
commit | 38ef5073e1cb474779e82d2f4bda521ef2ef03fa (patch) | |
tree | 9a05d069d6280e64a0188ca910b069d5ed1283ec /gio | |
parent | 9618dcc11c2468360b4431aa86dcf4a6ac6628ca (diff) | |
download | pygobject-38ef5073e1cb474779e82d2f4bda521ef2ef03fa.tar.gz pygobject-38ef5073e1cb474779e82d2f4bda521ef2ef03fa.tar.xz pygobject-38ef5073e1cb474779e82d2f4bda521ef2ef03fa.zip |
Wrap new GFile method.
2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
* gio/gfile.override:
(_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method.
svn path=/trunk/; revision=1047
Diffstat (limited to 'gio')
-rw-r--r-- | gio/gfile.override | 47 |
1 files changed, 46 insertions, 1 deletions
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 */ |