[pygobject] Wrap gio.File.eject_mountable_with_operation()



commit 8cff5d53183ae81364ac74a34a1d52e55e082eb4
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date:   Fri Jan 1 16:50:15 2010 +0100

    Wrap gio.File.eject_mountable_with_operation()

 gio/gfile.override |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)
---
diff --git a/gio/gfile.override b/gio/gfile.override
index 998b309..27cbee7 100644
--- a/gio/gfile.override
+++ b/gio/gfile.override
@@ -1403,6 +1403,60 @@ _wrap_g_file_eject_mountable(PyGObject *self, PyObject *args, PyObject *kwargs)
     return NULL;
 }
 %%
+override g_file_eject_mountable_with_operation kwargs
+static PyObject *
+_wrap_g_file_eject_mountable_with_operation(PyGObject *self,
+					    PyObject *args,
+					    PyObject *kwargs)
+{
+    static char *kwlist[] = { "callback", "flags", "mount_operation",
+                              "cancellable", "user_data", NULL };
+    PyGIONotify *notify;
+    PyObject *py_flags = NULL;
+    PyGObject *mount_operation;
+    GMountUnmountFlags flags = G_MOUNT_UNMOUNT_NONE;
+    PyGObject *py_cancellable = NULL;
+    GCancellable *cancellable;
+
+    notify = pygio_notify_new();
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                "O|OOOO:File.eject_mountable_with_operation",
+                                kwlist,
+                                &notify->callback,
+                                &py_flags,
+                                &mount_operation,
+                                &py_cancellable,
+                                &notify->data))
+        goto error;
+      
+    if (!pygio_notify_callback_is_valid(notify))
+        goto error;
+
+    if (py_flags && pyg_flags_get_value(G_TYPE_MOUNT_UNMOUNT_FLAGS,
+                                        py_flags, (gpointer) &flags))
+        goto error;
+
+    if (!pygio_check_cancellable(py_cancellable, &cancellable))
+        goto error;
+
+    pygio_notify_reference_callback(notify);
+
+    g_file_eject_mountable_with_operation(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;
+}
+%%
 override g_file_find_enclosing_mount_async kwargs
 static PyObject *
 _wrap_g_file_find_enclosing_mount_async(PyGObject *self,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]