[glibmm] Gio::SocketClient: Added some methods.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::SocketClient: Added some methods.
- Date: Mon, 25 Mar 2013 09:24:45 +0000 (UTC)
commit 265a1de64abed1803911464452807e39a4ddb16c
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Mar 25 10:24:34 2013 +0100
Gio::SocketClient: Added some methods.
* gio/src/socketclient.hg: Added get/set_tls(),
get/set_tls_validation_flags(), get/set_proxy_resolver().
Added timeout, tls, enable-proxy, tls-validation, and
proxy-resolver properties.
Added the event signal.
* tools/m4/convert_gio.m4: Added necessary conversions.
ChangeLog | 11 +++++++++++
gio/src/socketclient.hg | 22 ++++++++++++++++++++++
tools/m4/convert_gio.m4 | 2 ++
3 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c87a03a..d42fb8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-03-25 Murray Cumming <murrayc murrayc com>
+
+ Gio::SocketClient: Added some methods.
+
+ * gio/src/socketclient.hg: Added get/set_tls(),
+ get/set_tls_validation_flags(), get/set_proxy_resolver().
+ Added timeout, tls, enable-proxy, tls-validation, and
+ proxy-resolver properties.
+ Added the event signal.
+ * tools/m4/convert_gio.m4: Added necessary conversions.
+
2013-03-25 Chun-wei Fan <fanc999 yahoo com tw>
Visual Studio Projects: Fix and update.
diff --git a/gio/src/socketclient.hg b/gio/src/socketclient.hg
index 5331a1e..16257f7 100644
--- a/gio/src/socketclient.hg
+++ b/gio/src/socketclient.hg
@@ -24,6 +24,7 @@
#include <giomm/enums.h>
#include <giomm/socket.h>
#include <giomm/socketconnection.h>
+#include <giomm/proxyresolver.h>
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
@@ -31,6 +32,8 @@ _PINCLUDE(glibmm/private/object_p.h)
namespace Gio
{
+_WRAP_ENUM(SocketClientEvent, GSocketClientEvent)
+
/** Helper for connecting to a network service.
*
* @see SocketConnection, SocketListener
@@ -140,6 +143,16 @@ public:
_WRAP_METHOD(bool get_enable_proxy() const, g_socket_client_get_enable_proxy)
_WRAP_METHOD(void set_enable_proxy(bool enable), g_socket_client_set_enable_proxy)
+
+ _WRAP_METHOD(bool get_tls() const, g_socket_client_get_tls)
+ _WRAP_METHOD(void set_tls(bool tls = true), g_socket_client_set_tls)
+ _WRAP_METHOD(TlsCertificateFlags get_tls_validation_flags() const,
g_socket_client_get_tls_validation_flags)
+ _WRAP_METHOD(void set_tls_validation_flags(TlsCertificateFlags flags),
g_socket_client_set_tls_validation_flags)
+
+ _WRAP_METHOD(Glib::RefPtr<ProxyResolver> get_proxy_resolver(), g_socket_client_get_proxy_resolver,
refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const ProxyResolver> get_proxy_resolver() const,
g_socket_client_get_proxy_resolver, refreturn, constversion)
+ _WRAP_METHOD(void set_proxy_resolver(const Glib::RefPtr<ProxyResolver>& proxy_resolver),
g_socket_client_set_proxy_resolver)
+
_WRAP_METHOD(guint get_timeout() const, g_socket_client_get_timeout)
_WRAP_METHOD(void set_timeout(guint timeout), g_socket_client_set_timeout)
@@ -150,6 +163,15 @@ public:
_WRAP_PROPERTY("local-address", Glib::RefPtr<SocketAddress>)
_WRAP_PROPERTY("protocol", SocketProtocol)
_WRAP_PROPERTY("type", SocketType)
+ _WRAP_PROPERTY("timeout", guint)
+ _WRAP_PROPERTY("enable-proxy", bool)
+ _WRAP_PROPERTY("tls", bool)
+ _WRAP_PROPERTY("tls-validation-flags", TlsCertificateFlags)
+ _WRAP_PROPERTY("proxy-resolver", Glib::RefPtr<ProxyResolver>)
+
+#m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<SocketConnectable>&',`Glib::wrap($3)')
+#m4 _CONVERSION(`GIOStream*',`const Glib::RefPtr<IOStream>&',`Glib::wrap($3)')
+ _WRAP_SIGNAL(void event(SocketClientEvent event, const Glib::RefPtr<SocketConnectable>& connectable, const
Glib::RefPtr<IOStream>& connection), event, no_default_handler)
};
} // namespace Gio
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 9e3148b..edc359b 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -35,6 +35,7 @@ _CONV_ENUM(G,OutputStreamSpliceFlags)
_CONV_ENUM(G,PasswordSave)
_CONV_ENUM(G,ResolverRecordType)
_CONV_ENUM(G,SettingsBindFlags)
+_CONV_ENUM(G,SocketClientEvent)
_CONV_ENUM(G,SocketFamily)
_CONV_ENUM(G,SocketMsgFlags)
_CONV_ENUM(G,SocketProtocol)
@@ -234,6 +235,7 @@ _CONVERSION(`PasswordSave',`GPasswordSave',`($2)$3')
_CONVERSION(`GOutputStream*',`Glib::RefPtr<OutputStream>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<OutputStream>&',`GOutputStream*',__CONVERT_CONST_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<ProxyResolver>&',`GProxyResolver*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`GProxyResolver*',`Glib::RefPtr<ProxyResolver>',`Glib::wrap($3)')
_CONVERSION(`GProxy*',`Glib::RefPtr<Proxy>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]