summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2018-12-06 13:38:43 +0100
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2018-12-06 13:38:43 +0100
commit93666c1663d54dd8c1ee60eba6f69405ed002560 (patch)
tree9219381c680efd717764cc142826ebc9232a3d06
parent17ee1d96b852ff74ca85c05448afb63e02488594 (diff)
downloadglibmm-93666c1663d54dd8c1ee60eba6f69405ed002560.tar.gz
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.
-rw-r--r--gio/src/tlsconnection.ccg17
-rw-r--r--gio/src/tlsconnection.hg7
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 <giomm/tlsdatabase.h>
#include <giomm/tlsinteraction.h>
#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<GTlsConnection*>(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.")