[Telepathy] Handle Uniqueness
Robert McQueen
robert.mcqueen at collabora.co.uk
Tue Jul 18 05:20:50 PDT 2006
It's intended that handles are unique only per type - you always need to
explicitly or implicitly (depending on the method/signal) include the
type. We didn't want to introduce an error case where you could provide
the wrong type of handle (trying to invite a room to a room, or other
meaningless operations). Methods which can act on different handle types
have got a type parameter, and those where there is no type ambiguity
(mostly contact-based stuff) don't.
Obviously everything works fine if you do decide to implement handles as
globally unique inside your connection manager, which Gabble does
currently (although we'd like to change it to a more efficient
implementation), but having uniqueness per type means people can choose
different implementations for different handle types (eg list handles
could just be constants). A patch for the spec to clarify this would be
cool.
Regards,
Rob
Daniel d'Andrada Tenório de Carvalho wrote:
> Hi,
>
> The spec (.13) currently doesn't make any statement about its handle
> uniqueness. It's not clear whether, within a connection, a handle alone
> identifies a resource uniquely or if only a tuple (handle_type, handle)
> does that.
>
> By the methods' signatures the second option seens to be the case, but I
> think that having handle uniqueness (instead of per type) would make the
> spec more elegant (as a handle alone would have a unique ID status,
> which is a widespread concept) and you would also discard the
> handle_type parameter from HoldHandles, InspectHandles and ReleaseHandles.
>
> Anyway, regardless of what option is finally chosen, the uniqueness
> concept adopted must be clearly stated in the spec.
>
> Regards,
> Daniel d'Andrada T. de Carvalho - INdT
More information about the Telepathy
mailing list