Re: final account rework

Xavier Claessens <[email protected]> Fri, 06 Oct 2006 19:07:09 +0200
Newsgroups gmane.comp.gnome.gossip.devel
Message-ID <1160154429.4708.22.camel@zdra-desktop>
Le mercredi 04 octobre 2006 à 14:31 -0700, Eitan Isaacson a écrit :
> > I think it's ready for HEAD. There is still some work to integrate this
> > with TELEPATHY:
> > 
> >  - gossip-account-unknown.[ch] has still to be implemented based on the
> > initial UI that Eitan did in the TELEPATHY branch.
> 
> Easy!
> 
> > 
> >  - gossip_session_new_account() takes only the session and the
> > GossipAccountType as parameters. My idea was to call
> > gossip_telepathy_cmgr_new_account_from_protocol() to create the new
> > account when the telepathy protocol is used, but this functions takes as
> > parameters GossipCmgrInfo and the protocol's name. How can it be
> > adapted ? Eitan have you an idea for that ? I really think we should
> > avoid the actual solution which is directly call this function from the
> > UI, it breaks the libgossip abstraction layer.
> 
> This is the reason why I originally took telepathy out of the protocols
> directory. The GossipProtocol abstraction doesn't make sense with the
> new gossip+telepathy design since the abstraction already exists in the
> D-Bus layer. For now I am still implementing GossipProtocol just because
> i makes life easier. The only way I could see us retaining the
> abstraction layer while keeping jabber and telepathy in the same tree is
> by adding a funny function that will look something like this:
> 
> GList *gossip_protocol_list_protocols(GossipProtocol *protocol);
> 
> which  will return a list of available protocols, in the jabber backend
> case, it will return just "jabber"
> 
> of course we will need something like this too:
> 
> GHashTable *gossip_protocol_get_parameters (GossipProtocol *protocol,
>                                             const gchar *protocol_name);
> 
> Which will return a table in the form of
> account_name->GossipAccountParam
> 
> The jabber backend will obviously just return a bunch of static data.

If I understand telepathy we can have many connection managers, and each
cmgr can support more than one IM protocol ? So to create an account we
have to specify the cmgr and the protocol-name ? I'm not sure it's
possible to make something clean, what we need is:

GossipAccount *
gossip_session_new_account (GossipSession *session,
			    const gchar   *protocol_name,
			    const gchar   *cmgr_name);

The problem with that is the Jabber gossip-protocol doesn't needs those
2 arguments. What we can do is using protocol_name instead of the actual
GossipAccountType, but cmgr_name is telepathy-specific and won't be used
by other protocols.

Xavier.

_______________________________________________
Gossip-dev mailing list
[email protected]
http://lists.imendio.com/mailman/listinfo/gossip-dev
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQBFJo096dEBUn2qPAMRAn7uAKCRYOjXmkeUiXndFFh1/n/crx5RTACcDaAN
XbkkScMMblauyOqvNTzZe6g=
=sAVj
-----END PGP SIGNATURE-----