Bug 34071 - advertise local/recommended (disco'd) chatroom servers
Summary: advertise local/recommended (disco'd) chatroom servers
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-09 05:08 UTC by Guillaume Desmottes
Modified: 2019-12-03 19:50 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2011-02-09 05:08:36 UTC
As said in bug #33901:
"""
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.
"""
Comment 1 Guillaume Desmottes 2011-02-09 05:33:53 UTC
I'm trying to implement this but TpChannelManagerTypeForeachChannelClassFunc doesn't give us the self pointer of the manager, so we can't get the default server with _gabble_connection_find_conference_server(); which is pretty annoying. :\
Comment 2 Will Thompson 2011-02-11 10:10:11 UTC
(In reply to comment #1)
> I'm trying to implement this but TpChannelManagerTypeForeachChannelClassFunc
> doesn't give us the self pointer of the manager, so we can't get the default
> server with _gabble_connection_find_conference_server(); which is pretty
> annoying. :\

That's because TpChannelManager *Type* ForeachChannelClassFunc is a 'static' version (in Java terms): it operates on the type, not on instances of it.

Gabble could also implement 
TpChannelManagerForeachChannelClassFunc foreach_channel_class; which does give you the self pointer. This would mean we'd have more classes once connected, which is correct!

(However… I think RequestableChannelClasses can't change once you're connected, so I suppose we'd have to not signal Connected till we've discovered the conference servers… which would be unhappymaking.)
Comment 3 Guillaume Desmottes 2011-02-14 03:40:33 UTC
(In reply to comment #2)
> (However… I think RequestableChannelClasses can't change once you're connected,
> so I suppose we'd have to not signal Connected till we've discovered the
> conference servers… which would be unhappymaking.)

You' right: http://telepathy.freedesktop.org/spec/Connection_Interface_Requests.html#Property:RequestableChannelClasses

So we basically have 2 options here:
- Expose the servers in the RCC and delay CONNECTED until we discovered them
- Add a property + change signal.

Note that we'll have exactly the same problem if we want to expose contact-search servers (which I think we should).
Comment 4 Simon McVittie 2011-02-14 03:47:14 UTC
I think the two requestable channel classes that make sense for room lists are "a room list with an arbitrary DNS name" and "the single default room list". If we want lists of suggested "nearby" room list and contact list servers, they should be informational properties, not part of a requestable channel class, IMO.

Perhaps we could have a Conn.I.SuggestedServices or something, which is basically the same concept as Jabber disco? "These services are attached to our home server or recommended by our sysadmin, please offer them to the user", basically.
Comment 5 Guillaume Desmottes 2011-02-14 04:01:43 UTC
(In reply to comment #4)
> I think the two requestable channel classes that make sense for room lists are
> "a room list with an arbitrary DNS name" and "the single default room list". If
> we want lists of suggested "nearby" room list and contact list servers, they
> should be informational properties, not part of a requestable channel class,
> IMO.

Atm Gabble has only one RCC:
({ ChannelType: RoomList, TargetHandleType: None}, [Server])

Should we have
({ ChannelType: RoomList, TargetHandleType: None}, [])
as well for the "default" case?


> Perhaps we could have a Conn.I.SuggestedServices or something, which is
> basically the same concept as Jabber disco? "These services are attached to our
> home server or recommended by our sysadmin, please offer them to the user",
> basically.

Yes that could do the job. Using an a{sv} I guess:

Conn.I.SuggestedServices = {
  'org.freedesktop.Telepathy.Channel.Type.RoomList.Server': ['server1', 'server2'],
  'org.freedesktop.Telepathy.Channel.Type.ContactSearch.Server': ['badger']
}

With the semantic that the first element in the list is the one used by default.

My use case is basically displaying a default server in the GtkEntry allowing user to define its own server.
Comment 6 Simon McVittie 2011-02-14 04:07:17 UTC
(In reply to comment #5)
> Atm Gabble has only one RCC:
> ({ ChannelType: RoomList, TargetHandleType: None}, [Server])

Sorry, yes, I'd misremembered. One RCC is sufficient, and we can use presence or absence of Server in Allowed to choose between the two possibilities.
Comment 7 Simon McVittie 2012-07-23 10:27:32 UTC
Retitling. This needs spec work.
Comment 8 GitLab Migration User 2019-12-03 19:50:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/126.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.