Bug 48234

Summary: TpStreamTubeConnection methods not introspectable
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium Keywords: patch
Version: git master   
Hardware: Other   
OS: All   
URL: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=intro-getters
Whiteboard: r+
i915 platform: i915 features:

Description Will Thompson 2012-04-03 03:44:14 UTC
socket_conn = conn.get_socket_connection()
Traceback (most recent call last):
  File "stream-tube.py", line 39, in _accept_cb
    socket_conn = conn.get_socket_connection()
AttributeError: 'StreamTubeConnection' object has no attribute 'get_socket_connection'

One can work around this thusly:

+        # FIXME: tp_stream_tube_connection_get_socket_connection() is not
+        # available via GI.
+        # socket_conn = conn.get_socket_connection()
+        socket_conn = conn.get_property('socket-connection')

but this is bad.
Comment 1 Guillaume Desmottes 2012-04-03 03:58:42 UTC
We use to consider _get_() functions as "C bindings" and so were skipping them from introspection (assuming other gir lg would have their own way to access GObject properties). But this is bullshit and we should just introspect them as well.
Comment 2 Xavier Claessens 2012-04-03 04:52:22 UTC
Fix:

find -name *.c | xargs sed -i -r "s/tp_(.+)_get_(.+): \(skip\)/tp_\1_get_\2:/g"
Comment 3 Xavier Claessens 2012-04-03 05:15:52 UTC
Made a patch while I was at it. I've kept skip for CM-side code, deprecated getters or stuff that can't really be introspected in a useful way.
Comment 4 Will Thompson 2012-04-03 05:47:55 UTC
Looks reasonable to me, FWIW.
Comment 5 Jonny Lamb 2012-04-03 06:39:35 UTC
Yeah, looks fine to me.
Comment 6 Xavier Claessens 2012-04-03 07:17:52 UTC
ok, just kept skip on tp_account_get_detailed_error() because it has better _vardict() variant, and tp_dbus/stream_tube_channel_get_parameters() which should get a _vardict() variant.

Branch merged.

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.