[Telepathy] using ContactCapabilities?
Jiri Baum
jiri at baum.com.au
Mon Nov 9 08:50:18 PST 2009
Hi,
> > HandlerChannelFilter property is: dbus.Array([
> > dbus.Dictionary({
> > CHANNEL + '.ChannelType' :
> > CHANNEL_TYPE_DBUS_TUBE, CHANNEL + '.TargetHandleType':
> > CONNECTION_HANDLE_TYPE_CONTACT,
> > CHANNEL + '.Type.DBusTube.ServiceName' : SERVICE,
> > }, signature='sv')
Simon McVittie:
> This looks right... I think? Strictly speaking, the TargetHandleType should
> probably be dbus.UInt32(CONNECTION_HANDLE_TYPE_CONTACT), but hopefully
> everything does the right permissive matching on integers (MC certainly
> does).
Hopefully, yeah...
> The service name property looks right, but might be clearer written as
> (CHANNEL_TYPE_DBUS_TUBE + '.ServiceName') (which should be exactly
> equivalent).
I'll change that... I wasn't spending much time making it neat while it's not
working...
> > Capabilities property is dbus.Array([SERVICE], signature='as')
> > where SERVICE is 'au.com.baum.example'
> The Capabilities property should be empty - connection managers don't (need
> to) know anything about your service name - but that's not the problem.
Ah... I was putting the service name everywhere in the hope that it would show
up at the other end :-)
> > I don't think Mission Control is picking this up, because Empathy gives
> > the message "An invitation was offered for service au.com.baum.example,
> > but you don't have the needed application to handle it", though that
> > could be something else (like me not returning True where I should or
> > something). Also, HandleChannels is never called.
> That's probably because Empathy's HandleChannels is getting called, instead
> of yours? This probably means that MC isn't picking up your Handler...
> Could you try disabling all accounts except one Gabble account, and
> capturing a MC debug log?
That's easy enough, there's just the one account.
> Go offline in Empathy, kill all mission-control instances, run your Tubes
> app, then run:
>
> MC_DEBUG=all /usr/lib/telepathy/mission-control-5 2>&1 | tee mc.log
Hmm, had a bit of trouble doing it that way, but capturing the debug the other
way (start MC5 with debugging first, then start the rest) worked. This would
seem to be the relevant bit:
(process:7712): mcd-DEBUG: mcd_dispatcher_add_client: Register client
org.freedesktop.Telepathy.Client.au_com_baum_example
(process:7712): mcd-DEBUG: create_mcd_client: McdClient created for
org.freedesktop.Telepathy.Client.au_com_baum_example
(process:7712): mcd-DEBUG: mcd_client_start_introspection: No .client file for
au_com_baum_example. Ask on D-Bus.
(process:7712): tp-glib/proxy-DEBUG: tp_proxy_borrow_interface_by_id:
0x1ded980: org.freedesktop.DBus.Properties DBusGProxy is 0x1e170b0
(process:7712): tp-glib/proxy-DEBUG: noc_idle_context_invoke:
NameOwnerChanged(org.freedesktop.Telepathy.Client.au_com_baum_example, :1.74 -
> )
(process:7712): tp-glib/proxy-DEBUG: noc_idle_context_invoke:
NameOwnerChanged(org.freedesktop.Telepathy.Client.au_com_baum_example, :1.74 -
> )
(process:7712): mcd-DEBUG: mcd_dispatcher_append_client_caps:
org.freedesktop.Telepathy.Client.au_com_baum_example:
(process:7712): mcd-DEBUG: mcd_dispatcher_append_client_caps: - 0 channel
filters
(process:7712): mcd-DEBUG: mcd_dispatcher_append_client_caps: - 0 capability
tokens:
(process:7712): mcd-DEBUG: mcd_dispatcher_append_client_caps: -end-
(process:7712): mcd-DEBUG: _mcd_connection_update_client_caps: Sending client
caps to connection
(process:7712): mcd-DEBUG: get_interfaces_cb: Client
org.freedesktop.Telepathy.Client.au_com_baum_example vanished while we were
getting its interfaces
I think I've pasted the right bit, but just in case, I've put the whole log up
at http://www.baum.com.au/~jiri/tubes/mc-rde.log
> One day we should probably write a debug tool similar to telepathy-glib's
> examples/client/inspect-conn.c, which inspects a Client and explains what
> MC will think of it...
:-)
> After working out why MC isn't seeing you as a potential Handler and fixing
> whatever bug there is (in either your code or MC), the capability
> advertising through Gabble might just instantly work.
Yes. In any case, it would be good for the MC to see me, so that it doesn't
send my tubes to Empathy, which can just put up error messages...
> > The tube itself works - calls and signals go from one side to the other.
> > (That's via the NewChannels signal to grab the tube; taking that out
> > makes it not work at all.)
> You shouldn't need to use NewChannels, if we can get your Handler
> registration to work right; there's a bug either in your code or in MC.
Yes. My code is the likely culprit, given that I'm not really familiar with
telepathy yet.
Thank you
Jiri
--
Jiri Baum <jiri at baum.com.au> http://www.baum.com.au/~jiri
More information about the telepathy
mailing list