Bug 50712

Summary: Compilation warnings/error because of TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED
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 CC: guillaume.desmottes, xclaesse
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Ignore deprecations in TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED
text-mixin: use versioned deprecation macros

Description Guillaume Desmottes 2012-06-05 01:21:30 UTC
I tried building telepathy-logger with tp-glib master. As it still depends on tp-glib 0.18.0 (which is fair) I defined:

AC_DEFINE(TP_VERSION_MIN_REQUIRED, TP_VERSION_0_18, [Ignore post 0.18 deprecations])
AC_DEFINE(TP_VERSION_MAX_ALLOWED, TP_VERSION_0_18, [Prevent post 0.18 APIs])

But still get this error:

contacts-conn.c:687:3: error: 'tp_base_connection_check_connected' is deprecated (declared at /home/cassidy/usr/include/telepathy-1.0/telepathy-glib/base-
connection.h:131): Not available before 0.19 [-Werror=deprecated-declarations]

That's because since 5f90a8dd this function uses tp_base_connection_check_connected() which is annotated with _TP_AVAILABLE_IN_UNRELEASED.
Comment 1 Guillaume Desmottes 2012-06-05 01:48:53 UTC
Created attachment 62561 [details] [review]
Ignore deprecations in TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED

This macro is now implemented using in tp_base_connection_check_connected()
which is annotated with _TP_AVAILABLE_IN_UNRELEASED, but we shouldn't raise an
error if app don't want to use 0.20 API yet.
Comment 2 Guillaume Desmottes 2012-06-05 01:48:56 UTC
Created attachment 62562 [details] [review]
text-mixin: use versioned deprecation macros
Comment 3 Xavier Claessens 2012-06-05 01:54:44 UTC
It's a bit ugly for the macro, but I couldn't think about a better solution :(

+1
Comment 4 Guillaume Desmottes 2012-06-05 01:56:46 UTC
Merged to master.

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.