[glibmm] Gio: Use _WRAP_METHOD(..., ignore_deprecations)
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio: Use _WRAP_METHOD(..., ignore_deprecations)
- Date: Fri, 26 Nov 2021 16:10:10 +0000 (UTC)
commit 9a90d530e8ff90a22f266452579a89645c6c5937
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Fri Nov 26 17:07:21 2021 +0100
Gio: Use _WRAP_METHOD(..., ignore_deprecations)
gio/src/socketclient.ccg | 13 -------------
gio/src/socketclient.hg | 11 ++++-------
gio/src/tlsclientconnection.ccg | 17 -----------------
gio/src/tlsclientconnection.hg | 11 ++++-------
4 files changed, 8 insertions(+), 44 deletions(-)
---
diff --git a/gio/src/socketclient.ccg b/gio/src/socketclient.ccg
index e01cdf8d..8f17c65d 100644
--- a/gio/src/socketclient.ccg
+++ b/gio/src/socketclient.ccg
@@ -125,17 +125,4 @@ SocketClient::connect_to_uri_async(
gobj(), uri.c_str(), default_port, nullptr, &SignalProxy_async_callback, slot_copy);
}
-//TODO: Deprecate in glibmm 2.72.
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-TlsCertificateFlags SocketClient::get_tls_validation_flags() const
-{
- return
static_cast<TlsCertificateFlags>(g_socket_client_get_tls_validation_flags(const_cast<GSocketClient*>(gobj())));
-}
-
-void SocketClient::set_tls_validation_flags(TlsCertificateFlags flags)
-{
- g_socket_client_set_tls_validation_flags(gobj(), static_cast<GTlsCertificateFlags>(flags));
-}
-G_GNUC_END_IGNORE_DEPRECATIONS
-
} // namespace Gio
diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg
index 857617a7..915d84e7 100644
--- a/gio/src/socketclient.hg
+++ b/gio/src/socketclient.hg
@@ -143,14 +143,11 @@ public:
_WRAP_METHOD(void set_tls(bool tls = true), g_socket_client_set_tls)
//TODO: Deprecate in glibmm 2.72.
- _WRAP_METHOD_DOCS_ONLY(g_socket_client_get_tls_validation_flags)
- TlsCertificateFlags get_tls_validation_flags() const;
- _WRAP_METHOD_DOCS_ONLY(g_socket_client_set_tls_validation_flags)
- void set_tls_validation_flags(TlsCertificateFlags flags);
- _IGNORE(g_socket_client_get_tls_validation_flags, g_socket_client_set_tls_validation_flags)
- //_WRAP_METHOD(TlsCertificateFlags get_tls_validation_flags() const,
g_socket_client_get_tls_validation_flags,
+ _WRAP_METHOD(TlsCertificateFlags get_tls_validation_flags() const,
g_socket_client_get_tls_validation_flags,
+ ignore_deprecations)
// deprecated "Do not attempt to ignore validation errors.")
- //_WRAP_METHOD(void set_tls_validation_flags(TlsCertificateFlags flags),
g_socket_client_set_tls_validation_flags,
+ _WRAP_METHOD(void set_tls_validation_flags(TlsCertificateFlags flags),
g_socket_client_set_tls_validation_flags,
+ ignore_deprecations)
// deprecated "Do not attempt to ignore validation errors.")
_WRAP_METHOD(Glib::RefPtr<ProxyResolver> get_proxy_resolver(), g_socket_client_get_proxy_resolver,
refreturn)
diff --git a/gio/src/tlsclientconnection.ccg b/gio/src/tlsclientconnection.ccg
index d6f1f633..0fb8fbb0 100644
--- a/gio/src/tlsclientconnection.ccg
+++ b/gio/src/tlsclientconnection.ccg
@@ -17,20 +17,3 @@
#include <gio/gio.h>
#include <giomm/socketconnectable.h>
#include <giomm/tlsclientconnectionimpl.h>
-
-namespace Gio
-{
-//TODO: Deprecate in glibmm 2.72.
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-void TlsClientConnection::set_validation_flags(TlsCertificateFlags flags)
-{
- g_tls_client_connection_set_validation_flags(gobj(), static_cast<GTlsCertificateFlags>(flags));
-}
-
-TlsCertificateFlags TlsClientConnection::get_validation_flags() const
-{
- return
static_cast<TlsCertificateFlags>(g_tls_client_connection_get_validation_flags(const_cast<GTlsClientConnection*>(gobj())));
-}
-G_GNUC_END_IGNORE_DEPRECATIONS
-
-} // namespace Gio
diff --git a/gio/src/tlsclientconnection.hg b/gio/src/tlsclientconnection.hg
index 194a7301..6ee2727c 100644
--- a/gio/src/tlsclientconnection.hg
+++ b/gio/src/tlsclientconnection.hg
@@ -62,14 +62,11 @@ public:
_WRAP_METHOD(Glib::RefPtr<const SocketConnectable> get_server_identity() const,
g_tls_client_connection_get_server_identity, constversion)
//TODO: Deprecate in glibmm 2.72.
- _WRAP_METHOD_DOCS_ONLY(g_tls_client_connection_set_validation_flags)
- void set_validation_flags(TlsCertificateFlags flags);
- _WRAP_METHOD_DOCS_ONLY(g_tls_client_connection_get_validation_flags)
- TlsCertificateFlags get_validation_flags() const;
- _IGNORE(g_tls_client_connection_set_validation_flags, g_tls_client_connection_get_validation_flags)
- //_WRAP_METHOD(void set_validation_flags(TlsCertificateFlags flags),
g_tls_client_connection_set_validation_flags,
+ _WRAP_METHOD(void set_validation_flags(TlsCertificateFlags flags),
g_tls_client_connection_set_validation_flags,
+ ignore_deprecations)
// deprecated "Do not attempt to ignore validation errors.")
- //_WRAP_METHOD(TlsCertificateFlags get_validation_flags() const,
g_tls_client_connection_get_validation_flags,
+ _WRAP_METHOD(TlsCertificateFlags get_validation_flags() const,
g_tls_client_connection_get_validation_flags,
+ ignore_deprecations)
// deprecated "Do not attempt to ignore validation errors.")
_IGNORE(g_tls_client_connection_set_use_ssl3, g_tls_client_connection_get_use_ssl3) dnl// deprecated
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]