[Bug 29218] TpStreamTube - high level stream tube API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 23 14:17:59 CEST 2010


https://bugs.freedesktop.org/show_bug.cgi?id=29218

--- Comment #18 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-09-23 05:17:59 PDT ---
Some random comments looking at the branch as-is to get a feel for the shape of
the API:

> +  [glib-2.0 >= 2.25.16, gobject-2.0 >= 2.25.16, gio-2.0 >= 2.25.16])

I'd rather not merge this until GLib 2.26 is out, but that should be quite
soon.

> + * stream-tube.h - a view for the TpChannel proxy

No longer true.

As per comments in Bug #30338 this should be TpStreamTubeChannel?

The constructor should perhaps insta-invalidate the channel if Service isn't in
the immutable properties? If it doesn't, then there should be a Feature for
"Service is guaranteed to be available".

> + * tp_stream_tube_offer_finish:

This looks very boilerplatey. Can we make a macro for this? (I think Wocky has
one?)

> +  return g_simple_async_result_get_op_res_gboolean (simple);

Should always return TRUE, unless a GError has been set. This method is
conceptually "void, throws TpError" rather than "returns gboolean, throws
TpError".

> +          /* why doesn't GIO provide a method to create a socket we don't
> +           * care about?

Factor out what this method would do and put it in util.h or util-internal.h?

> +          /* check there wasn't an error on the final attempt */
> +          if (error != NULL)

Never reached, I don't think? I think you need to clear the error at the
*beginning* of the for loop, so that after the last iteration it'll still be
set?

> +              G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT,

Stream tubes over IP are defined to be TCP, so use G_SOCKET_PROTOCOL_TCP.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list