pygobject r1046 - in trunk: . gio



Author: gianmt
Date: Mon Mar 30 18:50:29 2009
New Revision: 1046
URL: http://svn.gnome.org/viewvc/pygobject?rev=1046&view=rev

Log:
2009-03-30  Gian Mario Tagliaretti  <gianmt gnome org>

	* gio/gfile.override:
	(_wrap_g_file_eject_mountable) Wrap new GFile method.



Modified:
   trunk/ChangeLog
   trunk/gio/gfile.override

Modified: trunk/gio/gfile.override
==============================================================================
--- trunk/gio/gfile.override	(original)
+++ trunk/gio/gfile.override	Mon Mar 30 18:50:29 2009
@@ -1281,8 +1281,54 @@
     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 */



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