[Telepathy] telepathy-glib: TpConnectionManager::protocols is awkward

Murray Cumming murrayc at murrayc.com
Tue Oct 14 08:42:58 PDT 2008

On Mon, 2008-10-13 at 17:10 +0200, Murray Cumming wrote:
> On Mon, 2008-09-29 at 13:48 +0100, Simon McVittie wrote:
> > > 3. Introspection seems to happen soon after activation (for instance,
> > > when we call tp_connection_manager_activate()
> > > http://library.gnome.org/devel/telepathy-glib/unstable/telepathy-glib-connection-manager.html#tp-connection-manager-activate
> > > But the documentation suggests that that function will have no effect if
> > > the connection manager is already activated. So how can I do
> > > introspection in that case?
> > 
> > It's done automatically; between the point when introspection finishes
> > and the point when the CM process exits, the introspected data is
> > guaranteed to be up to date (it can't change during runtime). So, you
> > don't need to re-trigger introspection if it has already happens.
> [snip]
> Thanks. So:
> a)
> It's impossible for introspection to finish in the middle of my code,
> such as this?
> if(!introspected)
> {
>   connect to the signal
>   activate() to get the introspection
> }
> and
> b)
> when this documentation says the the function will have no effect if the
> connection manager is already activated, it means that introspection has
> finished by the time it can be considered "activated"?
> http://library.gnome.org/devel/telepathy-glib/unstable/telepathy-glib-connection-manager.html#tp-connection-manager-activate

And here is another small question. Eventually I hope to move on from
this one unpleasant function.

When a TpConnectionManager is activated (causing it to be running),
got-info seems to actually be emitted twice always, once with cached
information (TP_CM_INFO_SOURCE_FILE), and once with introspection
information (TP_CM_INFO_SOURCE_LIVE).

I guess that should be documented. And that would allow me to know that
I can, for instance, unref any user_data (and disconnect the signal)
after the second emission.

(The behaviour seemed more random with a previous version of
telepathy-glib, but it seems that predictable now.)

murrayc at murrayc.com

More information about the Telepathy mailing list