[Telepathy] Get existing connection in clients

Xavier Claessens xclaesse at gmail.com
Thu Jan 18 13:30:15 PST 2007


Hi,

I have a little problem with gossip. Before connecting an account I
check if there is no existing connection. So for each object on the bus
which is prefixed by "org.freedesktop.Telepathy.Connection." I inspect
the handle and compare it with the "account" parameter of the gossip's
account. If it matchs I use that existing dbus object.

The problem is it don't work in all cases. For example IRC uses the
"account" parameter for the nickname and it's not unique. So if there is
an existing connection with nickname "xclaesse" on gimpnet and I want to
connect to freenode with the same nickname gossip thinks it's already
connected, which is false !

I think only the CM can check if an account is already connected. I see
2 solutions here:

1) RequestConnection returns the existing object if it's already
connected. Currently if I try to connect an account that is already
connected I get this error:

* (gossip:6771): WARNING **: Connect() failed: Error acquiring bus name
org.freedesktop.Telepathy.Connection.idle.irc.xclaesse_irc_freenode_net,
The connection manager already has this connection active.

2) Add a new function like GetExistingConnection which returns the
object if it already exists and does nothing otherwise.

What do you think about ?

Xavier Claessens.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20070118/9b526e08/attachment.pgp


More information about the Telepathy mailing list