summaryrefslogtreecommitdiffstats
path: root/gio/gsocket.override
diff options
context:
space:
mode:
Diffstat (limited to 'gio/gsocket.override')
-rw-r--r--gio/gsocket.override48
1 files changed, 48 insertions, 0 deletions
diff --git a/gio/gsocket.override b/gio/gsocket.override
index c44af34..bfe7df2 100644
--- a/gio/gsocket.override
+++ b/gio/gsocket.override
@@ -153,6 +153,54 @@ _wrap_g_socket_client_connect_async(PyGObject *self,
pygio_notify_free(notify);
return NULL;
}
+%%
+override g_socket_client_connect_to_host_async kwargs
+static PyObject *
+_wrap_g_socket_client_connect_to_host_async(PyGObject *self,
+ PyObject *args,
+ PyObject *kwargs)
+{
+ static char *kwlist[] = { "callback", "host_and_port", "default_port",
+ "cancellable", "user_data", NULL };
+ PyGIONotify *notify;
+ PyGObject *py_cancellable = NULL;
+ GCancellable *cancellable;
+ gchar *host_and_port;
+ guint16 default_port;
+
+ notify = pygio_notify_new();
+
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+ "OsH|OO:gio.SocketClient.connect_to_host_async",
+ kwlist,
+ &notify->callback,
+ &host_and_port,
+ &default_port,
+ &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_host_async(G_SOCKET_CLIENT(self->obj),
+ host_and_port, default_port,
+ 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** */