[Telepathy] Spec changes: tube API

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Jul 19 06:45:23 PDT 2007

On Wed, 18 Jul 2007 at 14:19:39 +0100, Guillaume Desmottes wrote:
> Le vendredi 25 mai 2007 à 10:58 +0200, Guillaume Desmottes a écrit :
> > Hey,
> > 
> > I wrote a first draft of spec. See
> > http://projects.collabora.co.uk/~monkey/telepathy-spec-stream/
> > http://projects.collabora.co.uk/~cassidy/spec-stream.html#org.freedesktop.Telepathy.Channel.Type.Tubes
> > 
> Daf and I rewrote most these changes this morning. Please
> comments/review.

Tube_Stream_Address_Type::Unix: Should the socket path really be 's'?
Filesystem paths aren't guaranteed to be UTF-8 (or any other particular
encoding) so perhaps we should use 'ay'. Also, instead of saying
"string" I'd prefer it if you said "string (signature 's')" or
"byte array (signature 'ay')".

Tube_Stream_Address_Type::Abstract_Unix: likewise.

Tube_Stream_Address_Type::TCP: Shouldn't it be called IP or IPv4, so we
can use the same enum when we implement UDP tubes later?

When there's an a{sv} of tube parameters, we should explicitly say that
the parameters are defined by the service (i.e. CMs should support
arbitrary parameters). We should define a baseline set of types which
CMs must support - in practice Gabble currently supports 's', 'ay',
'i', 'u', 'n' and 'q', it appears.

Perhaps we should suggest that for stream tubes, we recommend that the
parameters are the same as in a _whatever._tcp TXT record in DNS-SD.

Are we sure we want to use a single struct "(uv)" to represent
stream addresses? It would be more consistent with the
handle-type/handle pairs elsewhere in the Tp API if we used two separate
arguments of type "u" and "v". Also, this would avoid some tedious
GValue manipulation when using dbus-glib :-)

<arg direction="out" name="address" type="uv"> is clearly wrong - "uv"
is not a single complete type. It should either be "(uv)" or two
parameters of types "u" and "v", depending whether you agree with my
previous paragraph.

More information about the Telepathy mailing list