summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorGian Mario Tagliaretti <gianmt@gnome.org>2009-12-31 10:16:18 +0100
committerGian Mario Tagliaretti <gianmt@gnome.org>2009-12-31 10:16:18 +0100
commitb08b20f2b1a57bcbf400d6fe8e87cf052bdb719d (patch)
tree8ae95f80676ede823e3b7e06782ad2fce276e6f8 /gio
parent116ea1bfe32946e67aa54eb8dc7b977e57f254c2 (diff)
downloadpygobject-b08b20f2b1a57bcbf400d6fe8e87cf052bdb719d.tar.gz
pygobject-b08b20f2b1a57bcbf400d6fe8e87cf052bdb719d.tar.xz
pygobject-b08b20f2b1a57bcbf400d6fe8e87cf052bdb719d.zip
Wrap gio.SocketClient.connect_to_service_async()
Diffstat (limited to 'gio')
-rw-r--r--gio/gsocket.override47
1 files changed, 47 insertions, 0 deletions
diff --git a/gio/gsocket.override b/gio/gsocket.override
index bfe7df2..c04018a 100644
--- a/gio/gsocket.override
+++ b/gio/gsocket.override
@@ -201,6 +201,53 @@ _wrap_g_socket_client_connect_to_host_async(PyGObject *self,
pygio_notify_free(notify);
return NULL;
}
+%%
+override g_socket_client_connect_to_service_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_service_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "domain", "service",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *domain, *service;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "Oss|OO:gio.SocketClient.connect_to_service_async",
+ kwlist,
+ &notify->callback,
+ &domain,
+ &service,
+ &py_cancellable,
+ &notify->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_socket_client_connect_to_service_async(G_SOCKET_CLIENT(self->obj),
+ domain, service,
+ cancellable,
+ (GAsyncReadyCallback) async_result_callback_marshal,
+ notify);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+
+ error:
+ pygio_notify_free(notify);
+ return NULL;
+}
/* Could not write method GSocket.receive_from: No ArgType for GSocketAddress** */
/* Could not write method GSocket.receive_message: No ArgType for GSocketAddress** */