Bug 41729 - TpChannel subclasses: Shouldn't connect D-Bus signals in constructed methods
Summary: TpChannel subclasses: Shouldn't connect D-Bus signals in constructed methods
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 11:36 UTC by Guillaume Desmottes
Modified: 2011-10-12 15:58 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
TpChannel: don't rely on introspection queue to add the iface ID of the type (4.32 KB, patch)
2011-10-12 15:46 UTC, Guillaume Desmottes
Details | Splinter Review

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.