[glibmm] TlsCertificate: Wrap its single virtual function.



commit a270ba1b7d7ac70e3fb5150ecb8c6f0a645edcc2
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Thu Mar 21 23:57:57 2013 -0400

    TlsCertificate: Wrap its single virtual function.
    
        * gio/src/tlscertificate.hg: Wrap the "verify" virtual function.  Also
        add a default value to the length parameter of the constructor
        accepting a data character array.
        * gio/src/gio_vfuncs.defs: Add the virtual function definition so that
        it is recognized.

 ChangeLog                 |   10 ++++++++++
 gio/src/gio_vfuncs.defs   |   11 +++++++++++
 gio/src/tlscertificate.hg |    6 +++++-
 3 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f34e8e8..9ca161c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2013-03-21  José Alburquerque  <jaalburquerque gmail com>
+
+       TlsCertificate: Wrap its single virtual function.
+
+       * gio/src/tlscertificate.hg: Wrap the "verify" virtual function.  Also
+       add a default value to the length parameter of the constructor
+       accepting a data character array.
+       * gio/src/gio_vfuncs.defs: Add the virtual function definition so that
+       it is recognized.
+
 2013-03-21  Murray Cumming  <murrayc murrayc com>
 
        Gio::FileInfo: Added get_deletion_date().
diff --git a/gio/src/gio_vfuncs.defs b/gio/src/gio_vfuncs.defs
index f9a011e..1917d6c 100644
--- a/gio/src/gio_vfuncs.defs
+++ b/gio/src/gio_vfuncs.defs
@@ -725,6 +725,17 @@
  )
 )
 
+; GTlsCertificate
+
+(define-vfunc verify
+  (of-object "GTlsCertificate")
+  (return-type "GTlsCertificateFlags")
+  (parameters
+   '("GSocketConnectable*" "identity")
+   '("GTlsCertificate*" "trusted_ca")
+  )
+)
+
 ; GTlsConnection
 
 (define-vfunc handshake
diff --git a/gio/src/tlscertificate.hg b/gio/src/tlscertificate.hg
index a1ff368..ec3b292 100644
--- a/gio/src/tlscertificate.hg
+++ b/gio/src/tlscertificate.hg
@@ -46,7 +46,7 @@ class TlsCertificate : public Glib::Object
   _CLASS_GOBJECT(TlsCertificate, GTlsCertificate, G_TLS_CERTIFICATE, Glib::Object, GObject)
 
 protected:
-  _WRAP_CTOR(TlsCertificate(const char* data, gssize length), g_tls_certificate_new_from_pem, errthrow)
+  _WRAP_CTOR(TlsCertificate(const char* data, gssize length = -1), g_tls_certificate_new_from_pem, errthrow)
   _WRAP_CTOR(TlsCertificate(const std::string& file), g_tls_certificate_new_from_file, errthrow)
   _WRAP_CTOR(TlsCertificate(const std::string& cert_file, const std::string& key_file), 
g_tls_certificate_new_from_files, errthrow)
 
@@ -78,6 +78,10 @@ public:
 
   // Write-only and construct-only
   //_WRAP_PROPERTY("private-key-pem", char*)
+
+#m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<const SocketConnectable>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<const TlsCertificate>&',`Glib::wrap($3, true)')
+  _WRAP_VFUNC(TlsCertificateFlags verify(const Glib::RefPtr<const SocketConnectable>& identity, const 
Glib::RefPtr<const TlsCertificate>& trusted_ca) const, "verify")
 };
 
 } // namespace Gio


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]