pygobject r1047 - in trunk: . gio



Author: gianmt
Date: Mon Mar 30 20:07:53 2009
New Revision: 1047
URL: http://svn.gnome.org/viewvc/pygobject?rev=1047&view=rev

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

	* gio/gfile.override:
	(_wrap_g_file_find_enclosing_mount_async) 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 20:07:53 2009
@@ -1328,8 +1328,53 @@
     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,
+				     &notify->callback,
+				     &io_priority,
+				     &pycancellable,
+				     &notify->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 */



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