summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--gio/gfile.override48
2 files changed, 52 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d18e704..f1f7b39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+ * gio/gfile.override:
+ (_wrap_g_file_eject_mountable) Wrap new GFile method.
+
+2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
+
* gio/gfile.override: (_wrap_g_file_copy) revert previous commit.
2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org>
diff --git a/gio/gfile.override b/gio/gfile.override
index e982b83..3169ae1 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -1281,8 +1281,54 @@ _wrap_g_file_tp_repr(PyGObject *self)
g_free(representation);
return result;
}
+%%
+override g_file_eject_mountable kwargs
+static PyObject *
+_wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "flags",
+ "cancellable", "user_data", NULL };
+ GCancellable *cancellable;
+ PyGObject *pycancellable = NULL;
+ GFileCreateFlags flags = G_FILE_CREATE_NONE;
+ PyObject *py_flags = NULL;
+ PyGIONotify *notify;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "O|OOO:File.eject_mountable",
+ kwlist,
+ &notify->callback,
+ &flags,
+ &pycancellable,
+ &notify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (py_flags && pyg_flags_get_value(G_TYPE_FILE_CREATE_FLAGS,
+ py_flags, (gpointer)&flags))
+ goto error;
+
+ if (!pygio_check_cancellable(pycancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_file_eject_mountable(G_FILE(self->obj), flags, cancellable,
+ (GAsyncReadyCallback)async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
-/* GFile.eject_mountable */
/* GFile.find_enclosing_mount_async */
/* GFile.set_attributes_async */
/* GFile.set_display_name_async */