Bug 30204 - TpCapabilities: API to check tube support
Summary: TpCapabilities: API to check tube support
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Guillaume Desmottes
QA Contact: Telepathy bugs list
URL: http://git.Collabora.co.uk/?p=user/ca...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-09-15 01:17 UTC by Guillaume Desmottes
Modified: 2010-09-22 03:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2010-09-15 01:17:43 UTC
Would be good to have tp_capabilities_supports_{stream,dbus}_tube (TpCapabilities *self, TpHandleType handle_type, const gchar *service);
Comment 2 Simon McVittie 2010-09-21 08:42:54 UTC
> +tp_capabilities_supports_stream_tube

To be consistent (and grammatically correct), this should be "supports_stream_tubes".

I'd prefer it if you added supports_dbus_tubes at the same time:

static gboolean
tp_capabilities_supports_tubes_common (TpCapabilities *self,
    const gchar *expected_channel_type,
    TpHandleType expected_handle_type,
    const gchar *expected_service_prop,
    const gchar *expected_service)
{
  ... the same thing you already implemented, but with expected_channel_type
  and expected_service_prop instead of constants ...
}

gboolean
tp_capabilities_supports_stream_tubes (TpCapabilities *self,
    TpHandleType handle_type,
    const gchar *service)
{
  return tp_capabilities_supports_tubes_common (self,
      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, handle_type,
      TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE, service);
}

gboolean
tp_capabilities_supports_dbus_tubes (TpCapabilities *self,
    TpHandleType handle_type,
    const gchar *service)
{
  return tp_capabilities_supports_tubes_common (self,
      TP_IFACE_CHANNEL_TYPE_DBUS_TUBE, handle_type,
      TP_PROP_CHANNEL_TYPE_DBUS_TUBE_SERVICE, service);
}
Comment 3 Guillaume Desmottes 2010-09-22 01:07:01 UTC
Fixed, squashed and rebased
http://git.Collabora.co.uk/?p=user/cassidy/telepathy-glib;a=shortlog;h=refs/heads/tube-cap-30204

I also changed the "Since:" as it's for 0.13 now.
Comment 4 Simon McVittie 2010-09-22 03:01:06 UTC
Congratulations, you've implemented the first feature in 0.13.x. review+
Comment 5 Guillaume Desmottes 2010-09-22 03:19:08 UTC
(In reply to comment #4)
> Congratulations, you've implemented the first feature in 0.13.x. review+

\o/

Merged. Will be in 0.13.1


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.