From d971d3e84d6c6f5791b3de7557a5708f4d110044 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 9 Jan 2009 16:13:42 +0000 Subject: Make empathy_tp_tube_accept_stream_tube more like underlying dbus function and hand errors to the caller Signed-off-by: Sjoerd Simons svn path=/trunk/; revision=2156 --- libempathy/empathy-tp-tube.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'libempathy/empathy-tp-tube.h') diff --git a/libempathy/empathy-tp-tube.h b/libempathy/empathy-tp-tube.h index a908b0690..90955caa4 100644 --- a/libempathy/empathy-tp-tube.h +++ b/libempathy/empathy-tp-tube.h @@ -45,6 +45,19 @@ G_BEGIN_DECLS typedef struct _EmpathyTpTube EmpathyTpTube; typedef struct _EmpathyTpTubeClass EmpathyTpTubeClass; +typedef struct { + TpSocketAddressType type; + union { + struct socket_address_t { + GArray *path; + } socket; + struct inet_address_t { + gchar *hostname; + guint port; + } inet; + } a; +} EmpathyTpTubeAddress; + struct _EmpathyTpTube { GObject parent; gpointer priv; @@ -59,10 +72,14 @@ EmpathyTpTube *empathy_tp_tube_new (TpChannel *channel); EmpathyTpTube *empathy_tp_tube_new_stream_tube (EmpathyContact *contact, TpSocketAddressType type, const gchar *hostname, guint port, const gchar *service); + +typedef void (EmpatyTpTubeAcceptStreamTubeCb) (EmpathyTpTube *tube, + const EmpathyTpTubeAddress *address, const GError *error, + gpointer user_data); + void empathy_tp_tube_accept_stream_tube (EmpathyTpTube *tube, - TpSocketAddressType type); -void empathy_tp_tube_get_socket (EmpathyTpTube *tube, gchar **hostname, - guint *port); + TpSocketAddressType type, EmpatyTpTubeAcceptStreamTubeCb *callback, + gpointer user_data); G_END_DECLS -- cgit v1.2.3