[Gossip-dev] Questions about GossipContactManager

Xavier Claessens xclaesse at gmail.com
Tue Feb 20 17:48:57 CET 2007


On lun, 2007-02-19 at 11:31 +0000, Martyn Russell wrote:
> Xavier Claessens wrote:
> > Hello,
> 
> Hi,
> 
> > I'm fixing telepathy backend to use the new API and contact manager.
> > Here are my problems:
> > 
> > 1) Is gossip_protocol_find_contact() still useful ? Shouldn't we use
> > gossip_contact_manager_find() instead now ?
> 
> Well, one finds contacts for a given protocol and the other finds ALL
> contacts that we know about. So no I would say there is a good reason
> for keeping them both.

Hum... gossip_contact_manager_find() search for a given GossipAccount,
so I would say it's the same than searching in protocol.

> > 2) When gossip starts, gossip_protocol_new_contact() is called to create
> > all contacts saved in a xml file. That's useful for offline viewing logs
> > and others reasons... But should the backend keep those contacts even if
> > it's not connected ? 
> 
> Yes, why not? If it doesn't the GossipContactManager would have to keep
> them all and the backend would have to query libgossip about contacts. I
> think that is the wrong way round and shouldn't do that.

Ok, right.

> > 3) Using telepathy we can't know own-contact's ID before connecting
> > account. GossipContactManager gets own contact from the protocol even if
> > offline, is it a problem if it returns a GossipContact with NULL ID 
> 
> Yes, I can imagine that would be a problem in some places.
> 
> > and
> > create a new GossipContact object (Previous one is finalized) with all
> > information once the account is connected ?
> 
> Apart from protocols where you don't have an ID at any point, which
> might be problematic, I can't see why you can't create a contact object
> before connecting.

Every protocol has an ID or some kind of unique string for the own
contact, but it's known only after connecting. I can create the contact
object but it won't have an id before the account is connected.

Xavier.




More information about the Gossip-dev mailing list