[Bug 33901] add tp_capabilities_supports_room_list()
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 9 15:05:53 CET 2011
https://bugs.freedesktop.org/show_bug.cgi?id=33901
--- Comment #4 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-02-09 06:05:52 PST ---
(In reply to comment #2)
> You should also return a list of known servers, by scanning all the channel
> classes for requests with Server in Fixed. I don't know if Gabble implements
> it, but it sure should.
I tried implementing this in Gabble (bug #34071) but I'm not sure that's
actually possible. :\
> + for (j = 0; allowed_properties[j] != NULL; j++)
> + {
> + if (!tp_strdiff (allowed_properties[j],
> + TP_PROP_CHANNEL_TYPE_ROOM_LIST_SERVER))
> + server = TRUE;
> + }
>
> This is secret code for:
>
> server = tp_strv_contains (allowed_properties,
> TP_PROP_CHANNEL_TYPE_ROOM_LIST_SERVER);
Oh nice, changed.
> + * Return whether this protocol or connection can perform rooms
> + * listing.
>
> “Returns whether or not this protocol or connection supports listing rooms.”
fixed.
>
> + * Return whether this protocol or connection can perform rooms
> + * listing.
> + *
> + * Returns: %TRUE if a channel request containing RoomList as ChannelType,
> + * HandleTypeNone as TargetHandleType can be expected to work,
> + * %FALSE otherwise.
>
> I actually think these should be swapped around. The body should say something
> like:
>
> Discovers whether this protocol or connection supports listing rooms.
> Specifically, if this function returns %TRUE, a room list channel can be
> requested as follows:
>
> |[ ... code for requesting a channel ... ]|
>
> If with_server is set to %TRUE, a list of rooms on a particular server can be
> requested as follows:
>
> |[ ... ]|
done.
(In reply to comment #3)
> Or, thinking aloud, maybe we should have:
>
> enum {
> ROOM_LISTING_SUPPORTED = 1,
> ROOM_LISTING_SERVER_SUPPORTED = 2,
> ROOM_LISTING_SERVER_REQUIRED = 4
> } RoomListingSupportFlags;
>
> as the return value, rather than a proliferation of non-self-documenting
> booleans? I'm not sure this helps much.
This could be nice, but shouldn't ROOM_LISTING_SUPPORTED be "included" in
ROOM_LISTING_SERVER_SUPPORTED and ROOM_LISTING_SERVER_REQUIRED?
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list