[glibmm] GTlsDatabase: Use std::string for filenames.



commit 773ada2f84c5c8b4da03794564fb9dd4d173cc65
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Mar 26 11:27:06 2013 +0100

    GTlsDatabase: Use std::string for filenames.
    
    * gio/src/tlsdatabase.hg: The anchor parameter
    and property are for a filename, so we should use
    std::string, because filenames are of unknown
    encoding.

 ChangeLog                  |   11 ++++++++++-
 gio/src/tlsfiledatabase.hg |   11 ++++++++---
 2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9da95d5..15a6465 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,13 @@
-2013-03-25  Murray Cumming  <murrayc murrayc com>
+2013-03-26  Murray Cumming  <murrayc murrayc com>
+
+       GTlsDatabase: Use std::string for filenames.
+
+       * gio/src/tlsdatabase.hg: The anchor parameter
+       and property are for a filename, so we should use
+       std::string, because filenames are of unknown
+       encoding.
+
+2013-03-26  Murray Cumming  <murrayc murrayc com>
 
        Gio: Correct TlsDatabase/TlsFileDatbase derivation.
 
diff --git a/gio/src/tlsfiledatabase.hg b/gio/src/tlsfiledatabase.hg
index 6b67abe..516e211 100644
--- a/gio/src/tlsfiledatabase.hg
+++ b/gio/src/tlsfiledatabase.hg
@@ -34,6 +34,7 @@ namespace Gio
  * TlsFileDatabase is implemented by TlsDatabase objects which load their
  * certificate information from a file. It is an interface which TLS library
  * specific subtypes implement.
+ *
  * @newin{2,36}
  */
 class TlsFileDatabase
@@ -45,12 +46,16 @@ class TlsFileDatabase
 public:
   //TODO: Should this create() method be in TlsDatabase since the _new()
   //function returns a GTlsDatabase?
-  //TODO: It is not possible to use _WRAP_CTR()/WRAP_CREATE() here because this
+  //  No, it's normal for a G* C API to return a base type, but we correct that in C++.
+  //  For instance, many GTK+ _new() functions return GtkWidget*. murrayc.
+
+  //TODO: It is not possible to use _WRAP_CTOR()/WRAP_CREATE() here because this
   //class is an interface.
+  //  So, should we make it possible to use them? murrayc.
 #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_METHOD(static Glib::RefPtr<TlsFileDatabase> create(const std::string& anchors), 
g_tls_file_database_new, errthrow)
 
-  _WRAP_PROPERTY("anchors", Glib::ustring)
+  _WRAP_PROPERTY("anchors", std::string)
 };
 
 } // namespace Gio


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