From 93666c1663d54dd8c1ee60eba6f69405ed002560 Mon Sep 17 00:00:00 2001 From: Kjell Ahlstedt Date: Thu, 6 Dec 2018 13:38:43 +0100 Subject: Gio::TlsConnection: Disable deprecation warnings from glib g_tls_connection_[set,get]_rehandshake_mode() have been deprecated in glib/gio. They can't be deprecated in the stable glibmm-2-58 branch now. This patch makes it possible to build glibmm-2.58.x against the newest glib. --- gio/src/tlsconnection.ccg | 17 +++++++++++++++++ gio/src/tlsconnection.hg | 7 +++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gio/src/tlsconnection.ccg b/gio/src/tlsconnection.ccg index 4ec8d7e4..d41edbef 100644 --- a/gio/src/tlsconnection.ccg +++ b/gio/src/tlsconnection.ccg @@ -19,3 +19,20 @@ #include #include #include "slot_async.h" + +namespace Gio +{ + +// Deprecated in glib 2.60, but not in glibmm 2.58. +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +void TlsConnection::set_rehandshake_mode(TlsRehandshakeMode mode) +{ + g_tls_connection_set_rehandshake_mode(gobj(), ((GTlsRehandshakeMode)(mode))); +} +TlsRehandshakeMode TlsConnection::get_rehandshake_mode() const +{ + return ((TlsRehandshakeMode)(g_tls_connection_get_rehandshake_mode(const_cast(gobj())))); +} +G_GNUC_END_IGNORE_DEPRECATIONS + +} // namespace Gio diff --git a/gio/src/tlsconnection.hg b/gio/src/tlsconnection.hg index bee6d66d..f0c1bfff 100644 --- a/gio/src/tlsconnection.hg +++ b/gio/src/tlsconnection.hg @@ -60,8 +60,11 @@ public: _WRAP_METHOD(void set_require_close_notify(bool require_close_notify = true), g_tls_connection_set_require_close_notify) _WRAP_METHOD(bool get_require_close_notify() const, g_tls_connection_get_require_close_notify) - _WRAP_METHOD(void set_rehandshake_mode(TlsRehandshakeMode mode), g_tls_connection_set_rehandshake_mode) - _WRAP_METHOD(TlsRehandshakeMode get_rehandshake_mode() const, g_tls_connection_get_rehandshake_mode) + // Deprecated in glib 2.60, but not in glibmm 2.58. + _WRAP_METHOD_DOCS_ONLY(g_tls_connection_set_rehandshake_mode) + void set_rehandshake_mode(TlsRehandshakeMode mode); + _WRAP_METHOD_DOCS_ONLY(g_tls_connection_get_rehandshake_mode) + TlsRehandshakeMode get_rehandshake_mode() const; _WRAP_METHOD(void set_use_system_certdb(bool use_system_certdb = true), g_tls_connection_set_use_system_certdb, deprecated "Use set_database() instead.") -- cgit v1.2.1