diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2010-01-01 18:10:49 +0100 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2010-01-01 18:10:49 +0100 |
commit | 6af506647f36f2b825bc6556df5ee57fa7721906 (patch) | |
tree | dde5fa761c2feb95b61033764be57a6a7d70d778 /gio | |
parent | e700efc839fc0b651fc9794a1611190bffa80263 (diff) | |
download | pygobject-6af506647f36f2b825bc6556df5ee57fa7721906.tar.gz pygobject-6af506647f36f2b825bc6556df5ee57fa7721906.tar.xz pygobject-6af506647f36f2b825bc6556df5ee57fa7721906.zip |
Wrap gio.File.start_mountable()
Diffstat (limited to 'gio')
-rw-r--r-- | gio/gfile.override | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/gio/gfile.override b/gio/gfile.override index 49168a7..1d5d7a7 100644 --- a/gio/gfile.override +++ b/gio/gfile.override @@ -1831,6 +1831,58 @@ _wrap_g_file_poll_mountable(PyGObject *self, pygio_notify_free(notify); return NULL; } +%% +override g_file_start_mountable kwargs +static PyObject * +_wrap_g_file_start_mountable(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { "callback", "flags", "start_operation", + "cancellable", "user_data", NULL }; + PyGIONotify *notify; + PyObject *py_flags = NULL; + PyGObject *mount_operation; + GDriveStartFlags flags = G_DRIVE_START_NONE; + PyGObject *py_cancellable = NULL; + GCancellable *cancellable; + + notify = pygio_notify_new(); + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + "O|OOOO:File.start_mountable", + kwlist, + ¬ify->callback, + &py_flags, + &mount_operation, + &py_cancellable, + ¬ify->data)) + goto error; + + if (!pygio_notify_callback_is_valid(notify)) + goto error; + + if (py_flags && pyg_flags_get_value(G_TYPE_DRIVE_START_FLAGS, + py_flags, (gpointer) &flags)) + goto error; + + if (!pygio_check_cancellable(py_cancellable, &cancellable)) + goto error; + + pygio_notify_reference_callback(notify); + + g_file_start_mountable(G_FILE(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; +} /* GFile.load_partial_contents_async: No ArgType for GFileReadMoreCallback */ /* GFile.load_partial_contents_finish: No ArgType for char** */ |