Bug 41729

Summary: TpChannel subclasses: Shouldn't connect D-Bus signals in constructed methods
Product: Telepathy Reporter: Guillaume Desmottes <guillaume.desmottes>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: TpChannel: don't rely on introspection queue to add the iface ID of the type

Description Guillaume Desmottes 2011-10-12 11:36:41 UTC
It is not guaranteed that the TpProxy will already have all the known interfaces when constructed is called, so trying to connect to a D-Bus signal may fail with a "does not have interface..." error even if it actually implement the iface.
Comment 1 Guillaume Desmottes 2011-10-12 15:11:32 UTC
Actually this is only a problem if we are connecting a signal on the Type iface. TpTextChannel is fine because it connects on signal on an Interface iface (Messages) which are not directly added when creating the object (as we get Interfaces from the immutable properties).

I don't see any reason why the Type iface isn't added directly as well.
Comment 2 Guillaume Desmottes 2011-10-12 15:46:25 UTC
Created attachment 52279 [details] [review]
TpChannel: don't rely on introspection queue to add the iface ID of the type

tp-glib uses to rely on its introspection queue to add the interface ID
of its channel type even when the type was already known during
construction (which is basically alway the case now as we always pass the
immutable properties when creating a TpChannel).

This was forcing TpChannel subclasses to have a CORE feature to connect
signals on their channel type interface for no good reason.
Comment 3 Guillaume Desmottes 2011-10-12 15:58:05 UTC
Attachment 52279 [details] pushed as fea8294 - TpChannel: don't rely on introspection queue to add the iface ID of the type

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.