[glibmm] TlsFileDatabase: Use _WRAP_METHOD() to wrap the create() method.
- From: José Alburquerque <jaalburqu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] TlsFileDatabase: Use _WRAP_METHOD() to wrap the create() method.
- Date: Wed, 13 Mar 2013 05:13:10 +0000 (UTC)
commit 4388cda321f06072759073fb572bebc960f6ceb8
Author: José Alburquerque <jaalburqu svn gnome org>
Date: Wed Mar 13 01:09:20 2013 -0400
TlsFileDatabase: Use _WRAP_METHOD() to wrap the create() method.
* gio/src/tlsfiledatabase.{ccg,hg}: It can't be properly wrapped using
_WRAP_CTOR()/WRAP_CREATE() yet but it can be wrapped using
_WRAP_METHOD(). (I don't know why I thought it had to be
handwrapped.)
ChangeLog | 9 +++++++++
gio/src/tlsfiledatabase.ccg | 16 ----------------
gio/src/tlsfiledatabase.hg | 4 ++--
3 files changed, 11 insertions(+), 18 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 54c9872..07c2cac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-03-13 José Alburquerque <jaalburquerque gmail com>
+
+ TlsFileDatabase: Use _WRAP_METHOD() to wrap the create() method.
+
+ * gio/src/tlsfiledatabase.{ccg,hg}: It can't be properly wrapped using
+ _WRAP_CTOR()/WRAP_CREATE() yet but it can be wrapped using
+ _WRAP_METHOD(). (I don't know why I thought it had to be
+ handwrapped.)
+
2013-03-12 José Alburquerque <jaalburquerque gmail com>
TlsFileDatabase: Add a TODO.
diff --git a/gio/src/tlsfiledatabase.ccg b/gio/src/tlsfiledatabase.ccg
index 6846283..d76f332 100644
--- a/gio/src/tlsfiledatabase.ccg
+++ b/gio/src/tlsfiledatabase.ccg
@@ -16,19 +16,3 @@
*/
#include <gio/gio.h>
-
-namespace Gio
-{
-
-Glib::RefPtr<TlsFileDatabase>
-TlsFileDatabase::create(const Glib::ustring& anchors)
-{
- GError* gerror = 0;
- GTlsFileDatabase* file_database = g_tls_file_database_new(anchors.c_str(),
- &gerror);
- if(gerror)
- ::Glib::Error::throw_exception(gerror);
- return Glib::wrap(file_database);
-}
-
-} // namespace Gio
diff --git a/gio/src/tlsfiledatabase.hg b/gio/src/tlsfiledatabase.hg
index bde873f..e5fe0f0 100644
--- a/gio/src/tlsfiledatabase.hg
+++ b/gio/src/tlsfiledatabase.hg
@@ -44,8 +44,8 @@ public:
//TODO: Wrap this using _WRAP_CTR()/WRAP_CREATE() when the
//g_tls_file_database_new() function does not do more than calling
//g_initable_new().
- _WRAP_METHOD_DOCS_ONLY(g_tls_file_database_new)
- static Glib::RefPtr<TlsFileDatabase> create(const Glib::ustring& anchors);
+#m4 _CONVERSION(`GTlsDatabase*',`Glib::RefPtr<TlsFileDatabase>',`Glib::wrap(G_TLS_FILE_DATABASE($3))')
+ _WRAP_METHOD(static Glib::RefPtr<TlsFileDatabase> create(const Glib::ustring& anchors),
g_tls_file_database_new, errthrow)
_WRAP_PROPERTY("anchors", Glib::ustring)
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]