[pygobject] Wrap gio.Resolver.lookup_service_async()
- From: Gian Mario Tagliaretti <gianmt src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pygobject] Wrap gio.Resolver.lookup_service_async()
- Date: Wed, 30 Dec 2009 13:08:25 +0000 (UTC)
commit 308421789ce849040d645077c41c80b6e2e65e83
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date: Wed Dec 30 14:00:22 2009 +0100
Wrap gio.Resolver.lookup_service_async()
gio/gresolver.override | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/gio/gresolver.override b/gio/gresolver.override
index 1930c67..4acd8d8 100644
--- a/gio/gresolver.override
+++ b/gio/gresolver.override
@@ -225,3 +225,51 @@ _wrap_g_resolver_lookup_service(PyGObject *self,
return Py_None;
}
}
+%%
+override g_resolver_lookup_service_async kwargs
+static PyObject *
+_wrap_g_resolver_lookup_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "service", "protocol", "domain"
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ gchar *service, *protocol, *domain;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Osss|OO:gio.Resolver.lookup_service_async",
+ kwlist,
+ ¬ify->callback,
+ &service,
+ &protocol,
+ &domain,
+ &py_cancellable,
+ ¬ify->data))
+ goto error;
+
+ if (!pygio_notify_callback_is_valid(notify))
+ goto error;
+
+ if (!pygio_check_cancellable(py_cancellable, &cancellable))
+ goto error;
+
+ pygio_notify_reference_callback(notify);
+
+ g_resolver_lookup_service_async(G_RESOLVER(self->obj),
+ service, protocol, domain,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]