[Telepathy] tp_cli_connection_manager_run_request_connection(): What parameter types.

Murray Cumming murrayc at murrayc.com
Tue Oct 28 09:48:31 PDT 2008

On Tue, 2008-10-28 at 11:22 +0000, Simon McVittie wrote:
> On Mon, 27 Oct 2008 at 20:29:57 +0100, Murray Cumming wrote:
> > The G_TYPE_STRING would be unnecessary, because telepathy-glib should
> > know what type to expect for the "account" value. That's what
> > GtkTreeModel and similar APIs do.
> That's not actually true - the types of some of the connection parameters are
> in the spec, but connection managers can also invent their own
> parameters

Nevertheless, telepathy-glib can know what the types are. It already
introspects the connection managers, as we've discussed.

>  (e.g. "old-ssl" in Gabble, which enables legacy SSL support).
> It is possible to discover the types via TpConnectionManager (which, behind
> the scenes, means over D-Bus or from the .manager file), and indeed
> account-creation UIs will need to do this, but that doesn't help you
> if you're hard-coding parameters and types into C code.

But you have to hard code the types either way, and you do that because
you know what connection manager you are using and what it provides. At
the moment you must explicitly hard-code the types in the application
code. I'm just saying that it should be implicit.

> There'd also be nothing to stop a CM having the wrong type for a
> well-known parameter - we'd consider it to be buggy, but that's no
> reason to let it crash client code remotely.

I think you should check for that when initializing the connection
manager. Constraints are good.

murrayc at murrayc.com

More information about the Telepathy mailing list