+2.35.9:
+
+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.
+
+ * gio/src/tlsfiledatabase.hg:
+
+2013-03-12 José Alburquerque <jaalburquerque@gmail.com>
+
+ TlsFileDatabase: Wrap the create() method.
+
+ * gio/src/tlsfiledatabase.{ccg,hg}: Manually wrap it because
+ presently the *_new() function does more than call g_initable_new().
+
+2013-02-26 José Alburquerque <jaalburquerque@gmail.com>
+
+ Tls*: Add the rest of the (unwrapped) properties, methods and vfuncs.
+
+ * gio/src/tlscertificate.{ccg,hg}: Wrap the "certificate" property.
+ * gio/src/tlsclientconnection.hg: Add the get_accepted_cas() methods
+ and the "accepted-cas" property.
+ * gio/src/tlsdatabase.hg: Add the lookup_certificates_issued_by*()
+ methods and virtual functions. Correct a TlsCertificate conversion
+ for the virtual functions so that the underlying GObject is properly
+ copied from the C++ wrapper.
+ * tools/m4/convert_gio.m4: Add a ByteArray conversion.
+
+ * gio/src/tlspassword.hg: Clarify a TODO.
+
+ * glib/glibmm.h: Add bytes.h and bytearray.h to the includes.
+
+2013-02-25 José Alburquerque <jaalburquerque@gmail.com>
+
+ glibmm: Add ByteArray.
+
+ * glib/src/bytearray.{ccg,hg}:
+ * glib/src/filelist.am: Add the new sources for the ByteArray class
+ that wraps GByteArray and include the sources in the build. Some of
+ the GTls* API uses GByteArray so it is necessary to wrap it.
+ * glib/src/glib_extra_objects.defs: Include an object definition for
+ GByteArray to avoid a gmmproc documentation warning.
+ * tools/m4/convert_glib.m4: Add a GByteArray conversion so the sources
+ can be processed properly.
+
+2013-02-25 Pavel Vasin <rat4vier@gmail.com>
+
+ AppInfo::get_all(): Fix ownerships
+
+ Bug #694505
+
+2013-02-25 José Alburquerque <jaalburquerque@gmail.com>
+
+ TlsDatabase: Virtual function const correction.
+
+ * gio/src/tlsdatabase.hg (create_certificate_handle_vfunc): Make it
+ const because it does not modify the database.
+
+2013-02-24 José Alburquerque <jaalburquerque@gmail.com>
+
+ Tls[Database|Interaction]: Add the virtual functions.
+
+ * gio/src/tlsdatabase.hg:
+ * gio/src/tlsinteraction.hg: Add the virtual functions. It is
+ necessary to wrap GByteArray to wrap the remaining three virtual
+ functions of TlsDatabase.
+
2.35.8 (unstable);
2013-02-21 Murray Cumming <murrayc@murrayc.com>
-2.35.8 (unstable);
+2.35.9 (unstable):
+
+Glib:
+* Add edByteArray, because it is used in the GTls* API.
+ (José Alburquerque)
+* AppInfo::get_all(): Fix ownerships.
+ (Pavel Vasi) Bug #694505
+
+
+Gio:
+* TlsFileDatabase: Add the create() method.
+ (José Alburquerque)
+* TlsCertificate: Add the certificate property.
+ (José Alburquerque)
+* TlsClientConnection: Add get_accepted_cas()
+ and the "accepted-cas" property.
+ (José Alburquerque)
+* TlsDatabase: Add the lookup_certificates_issued_by*()
+ methods and virtual functions. Correct a TlsCertificate conversion
+ for the virtual functions so that the underlying GObject is properly
+ copied from the C++ wrapper.
+ (José Alburquerque)
+* TlsInteraction: Add the virtual functions.
+ (José Alburquerque)
+
+
+2.35.8 (unstable):
Glib:
* Resolver: Add lookup_records(), lookup_records_async()
## You should have received a copy of the GNU Lesser General Public License
## along with this library. If not, see <http://www.gnu.org/licenses/>.
-AC_INIT([glibmm], [2.35.8],
+AC_INIT([glibmm], [2.35.9],
[http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
[glibmm], [http://www.gtkmm.org/])
AC_PREREQ([2.59])
AC_DEFINE([GIOMM_STATIC_LIB], [1], [Define if giomm is built as a static library])
])
-glibreq='2.0 >= 2.35.8'
+glibreq='2.0 >= 2.35.9'
GLIBMM_MODULES="sigc++-2.0 >= 2.2.10 glib-$glibreq gobject-$glibreq gmodule-$glibreq"
GIOMM_MODULES="$GLIBMM_MODULES gio-$glibreq"
_WRAP_METHOD(bool set_as_last_used_for_type(const std::string& content_type), g_app_info_set_as_last_used_for_type, errthrow)
-#m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<AppInfo> >',`Glib::ListHandle<Glib::RefPtr<AppInfo> >($3, Glib::OWNERSHIP_SHALLOW)')
+#m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<AppInfo> >',`Glib::ListHandle<Glib::RefPtr<AppInfo> >($3, Glib::OWNERSHIP_DEEP)')
_WRAP_METHOD(static Glib::ListHandle<Glib::RefPtr<AppInfo> > get_all(), g_app_info_get_all)
_WRAP_METHOD(static Glib::ListHandle<Glib::RefPtr<AppInfo> > get_all_for_type(const std::string& content_type), g_app_info_get_all_for_type)
*/
#include <gio/gio.h>
+#include <glibmm/bytearray.h>
#include <giomm/socketconnectable.h>
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
+namespace Glib
+{
+
+// Forward declaration.
+class ByteArray;
+
+}
+
namespace Gio
{
_WRAP_METHOD(TlsCertificateFlags verify(const Glib::RefPtr<const SocketConnectable>& identity{?}, const Glib::RefPtr<const TlsCertificate>& trusted_ca{?}) const, g_tls_certificate_verify)
_WRAP_METHOD(bool is_same(const Glib::RefPtr<const TlsCertificate>& cert_two) const, g_tls_certificate_is_same)
- //TODO: _WRAP_PROPERTY("certificate", GByteArray*)
-
+ _WRAP_PROPERTY("certificate", Glib::RefPtr<Glib::ByteArray>)
_WRAP_PROPERTY("certificate-pem", char*)
_WRAP_PROPERTY("issuer", Glib::RefPtr<TlsCertificate>)
- //TODO: _WRAP_PROPERTY("private-key", GByteArray*)
+ // Write-only and construct-only
+ //_WRAP_PROPERTY("private-key", Glib::RefPtr<Glib::ByteArray>)
// Write-only and construct-only
//_WRAP_PROPERTY("private-key-pem", char*)
_WRAP_METHOD(void set_use_ssl3(bool use_ssl3), g_tls_client_connection_set_use_ssl3)
_WRAP_METHOD(bool get_use_ssl3() const, g_tls_client_connection_get_use_ssl3)
- //TODO: _WRAP_METHOD(GList* get_accepted_cas(), g_tls_client_connection_get_accepted_cas)
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<Glib::ByteArray> >',`Glib::ListHandler< Glib::RefPtr<Glib::ByteArray> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
+ _WRAP_METHOD(std::vector< Glib::RefPtr<Glib::ByteArray> > get_accepted_cas(), g_tls_client_connection_get_accepted_cas)
- //TODO: _WRAP_PROPERTY("accepted-cas", gpointer)
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const Glib::ByteArray> >',`Glib::ListHandler< Glib::RefPtr<const Glib::ByteArray> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
+ _WRAP_METHOD(std::vector< Glib::RefPtr<const Glib::ByteArray> > get_accepted_cas() const, g_tls_client_connection_get_accepted_cas)
+ _WRAP_PROPERTY("accepted-cas", std::vector< Glib::RefPtr<Glib::ByteArray> >)
_WRAP_PROPERTY("server-identity", Glib::RefPtr<SocketConnectable>)
_WRAP_PROPERTY("use-ssl3", bool)
_WRAP_PROPERTY("validation-flags", TlsCertificateFlags)
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
+namespace Glib
+{
+
+// Forward declaration.
+class ByteArray;
+
+}
+
namespace Gio
{
_WRAP_METHOD(void lookup_certificate_issuer_async(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.?}, TlsDatabaseLookupFlags flags{.} = TLS_DATABASE_LOOKUP_NONE), g_tls_database_lookup_certificate_issuer_async, slot_name slot, slot_callback SignalProxy_async_callback)
_WRAP_METHOD(Glib::RefPtr<TlsCertificate> lookup_certificate_issuer_finish(const Glib::RefPtr<AsyncResult>& result), g_tls_database_lookup_certificate_issuer_finish, errthrow)
- //TODO: _WRAP_METHOD(GList* lookup_certificates_issued_by(GByteArray* issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable), g_tls_database_lookup_certificates_issued_by, errthrow)
- //TODO: _WRAP_METHOD(void lookup_certificates_issued_by_async(GByteArray* issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, gpointer user_data), g_tls_database_lookup_certificates_issued_by_async)
- //TODO: _WRAP_METHOD(GList* lookup_certificates_issued_by_finish(const Glib::RefPtr<AsyncResult>& result), g_tls_database_lookup_certificates_issued_by_finish, errthrow)
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<TlsCertificate> >',`Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
+ _WRAP_METHOD(std::vector< Glib::RefPtr<TlsCertificate> > lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.} = Gio::TLS_DATABASE_LOOKUP_NONE), g_tls_database_lookup_certificates_issued_by, errthrow)
+
+#m4 _CONVERSION(`GList*',`std::vector< Glib::RefPtr<const TlsCertificate> >',`Glib::ListHandler< Glib::RefPtr<const TlsCertificate> >::list_to_vector($3, Glib::OWNERSHIP_DEEP)')
+ _WRAP_METHOD(std::vector< Glib::RefPtr<const TlsCertificate> > lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.} = Gio::TLS_DATABASE_LOOKUP_NONE) const, g_tls_database_lookup_certificates_issued_by, errthrow)
+
+ _WRAP_METHOD(void lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.} = Gio::TLS_DATABASE_LOOKUP_NONE), g_tls_database_lookup_certificates_issued_by_async, slot_name slot, slot_callback SignalProxy_async_callback)
+ _WRAP_METHOD(std::vector< Glib::RefPtr<TlsCertificate> > lookup_certificates_issued_by_finish(const Glib::RefPtr<AsyncResult>& result), g_tls_database_lookup_certificates_issued_by_finish, errthrow)
_WRAP_METHOD(Glib::ustring create_certificate_handle(const Glib::RefPtr<const TlsCertificate>& certificate) const, g_tls_database_create_certificate_handle)
_WRAP_METHOD(void lookup_certificate_for_handle_async(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.?}, TlsDatabaseLookupFlags flags{.} = TLS_DATABASE_LOOKUP_NONE), g_tls_database_lookup_certificate_for_handle_async, slot_name slot, slot_callback SignalProxy_async_callback)
_WRAP_METHOD(Glib::RefPtr<TlsCertificate> lookup_certificate_for_handle_finish(const Glib::RefPtr<AsyncResult>& result), g_tls_database_lookup_certificate_for_handle_finish, errthrow)
-/* TODO:
- _WRAP_VFUNC(TlsCertificateFlags verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseVerifyFlags flags, const Glib::RefPtr<Cancellable>& cancellable), "verify_chain", errthrow)
- _WRAP_VFUNC(void verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseVerifyFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, gpointer user_data), "verify_chain_async")
+#m4 _CONVERSION(`GTlsCertificate*',`const Glib::RefPtr<TlsCertificate>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GSocketConnectable*',`const Glib::RefPtr<const SocketConnectable>&',`Glib::wrap($3, true)')
+#m4 _CONVERSION(`GTlsInteraction*',`const Glib::RefPtr<TlsInteraction>&',`Glib::wrap($3, true)')
+
+ _WRAP_VFUNC(TlsCertificateFlags verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseVerifyFlags flags{.}), "verify_chain", errthrow)
+ _WRAP_VFUNC(void verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseVerifyFlags flags{.}), "verify_chain_async", slot_name slot, slot_callback SignalProxy_async_callback)
+
+#m4 _CONVERSION(`GAsyncResult*',`const Glib::RefPtr<AsyncResult>&',`Glib::wrap($3, true)')
+
_WRAP_VFUNC(TlsCertificateFlags verify_chain_finish(const Glib::RefPtr<AsyncResult>& result), "verify_chain_finish", errthrow)
- _WRAP_VFUNC(Glib::ustring create_certificate_handle(const Glib::RefPtr<TlsCertificate>& certificate), "create_certificate_handle")
- _WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable), "lookup_certificate_for_handle", errthrow)
- _WRAP_VFUNC(void lookup_certificate_for_handle_async(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, gpointer user_data), "lookup_certificate_for_handle_async")
+
+ _WRAP_VFUNC(Glib::ustring create_certificate_handle(const Glib::RefPtr<TlsCertificate>& certificate) const, "create_certificate_handle")
+
+#m4 _CONVERSION(`Glib::RefPtr<TlsCertificate>',`GTlsCertificate*',`G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap($3)))')
+
+ _WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificate_for_handle", errthrow)
+ _WRAP_VFUNC(void lookup_certificate_for_handle_async(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificate_for_handle_async", slot_name slot, slot_callback SignalProxy_async_callback)
_WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_for_handle_finish(const Glib::RefPtr<AsyncResult>& result), "lookup_certificate_for_handle_finish", errthrow)
- _WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_issuer(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable), "lookup_certificate_issuer", errthrow)
- _WRAP_VFUNC(void lookup_certificate_issuer_async(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, gpointer user_data), "lookup_certificate_issuer_async")
+
+ _WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_issuer(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificate_issuer", errthrow)
+ _WRAP_VFUNC(void lookup_certificate_issuer_async(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificate_issuer_async", slot_name slot, slot_callback SignalProxy_async_callback)
_WRAP_VFUNC(Glib::RefPtr<TlsCertificate> lookup_certificate_issuer_finish(const Glib::RefPtr<AsyncResult>& result), "lookup_certificate_issuer_finish", errthrow)
- _WRAP_VFUNC(GList* lookup_certificates_issued_by(GByteArray* issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable), "lookup_certificates_issued_by", errthrow)
- _WRAP_VFUNC(void lookup_certificates_issued_by_async(GByteArray* issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot, gpointer user_data), "lookup_certificates_issued_by_async")
- _WRAP_VFUNC(GList* lookup_certificates_issued_by_finish(const Glib::RefPtr<AsyncResult>& result), "lookup_certificates_issued_by_finish", errthrow)
-*/
+
+#m4 _CONVERSION(`std::vector< Glib::RefPtr<TlsCertificate> >',`GList*',`g_list_copy(Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::vector_to_list($3).data())')
+#m4 _CONVERSION(`GByteArray*',`const Glib::RefPtr<Glib::ByteArray>&',`Glib::wrap($3, true)')
+
+ _WRAP_VFUNC(std::vector< Glib::RefPtr<TlsCertificate> > lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificates_issued_by", errthrow)
+ _WRAP_VFUNC(void lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}, TlsDatabaseLookupFlags flags{.}), "lookup_certificates_issued_by_async", slot_name slot, slot_callback SignalProxy_async_callback)
+ _WRAP_VFUNC(std::vector< Glib::RefPtr<TlsCertificate> > lookup_certificates_issued_by_finish(const Glib::RefPtr<AsyncResult>& result), "lookup_certificates_issued_by_finish", errthrow)
};
} // namespace Gio
*/
#include <gio/gio.h>
-
-namespace Gio
-{
-
-} // namespace Gio
_CLASS_INTERFACE(TlsFileDatabase, GTlsFileDatabase, G_TLS_FILE_DATABASE, GTlsFileDatabaseInterface)
public:
- //TODO: Wrap the the g_tls_file_database_new() C function which returns a
- //GTlsDatabase* and does more than calling g_initable_new().
+ //TODO: Should this create() method be in TlsDatabase since the _new()
+ //function returns a GTlsDatabase?
+ //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().
+#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)
};
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
+_PINCLUDE(gio/gio.h)
namespace Gio
{
_WRAP_METHOD(TlsInteractionResult ask_password_finish(const Glib::RefPtr<AsyncResult>& result), g_tls_interaction_ask_password_finish, errthrow)
_WRAP_METHOD(TlsInteractionResult invoke_ask_password(const Glib::RefPtr<TlsPassword>& password, const Glib::RefPtr<Cancellable>& cancellable{?}), g_tls_interaction_invoke_ask_password, errthrow)
-/* TODO:
+#m4 _CONVERSION(`GTlsPassword*',`const Glib::RefPtr<TlsPassword>&',`Glib::wrap($3, true)')
_WRAP_VFUNC(TlsInteractionResult ask_password(const Glib::RefPtr<TlsPassword>& password, const Glib::RefPtr<Cancellable>& cancellable), "ask_password", errthrow)
- _WRAP_VFUNC(void ask_password_async(const Glib::RefPtr<TlsPassword>& password, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable), "ask_password_async")
+ _WRAP_VFUNC(void ask_password_async(const Glib::RefPtr<TlsPassword>& password, const SlotAsyncReady& slot{callback}, const Glib::RefPtr<Cancellable>& cancellable{.}), "ask_password_async", slot_name slot, slot_callback SignalProxy_async_callback)
+
+#m4 _CONVERSION(`GAsyncResult*',`const Glib::RefPtr<AsyncResult>&',`Glib::wrap($3, true)')
_WRAP_VFUNC(TlsInteractionResult ask_password_finish(const Glib::RefPtr<AsyncResult>& result), "ask_password_finish", errthrow)
-*/
};
} // namespace Gio
_WRAP_CREATE(TlsPasswordFlags flags, const Glib::ustring& description)
_WRAP_METHOD(const guchar* get_value(gsize& length{?}) const, g_tls_password_get_value)
+
_WRAP_METHOD(void set_value(const guchar* value, gssize length = -1), g_tls_password_set_value)
// This function does not copy the value as g_tls_password_set_value() does.
// It keeps a reference to the original value and expects it to be freed
#m4 _CONVERSION(`gsize*', `gsize&', `*($3)')
_WRAP_VFUNC(const guchar* get_value(gsize& length) const, "get_value")
- //TODO: _WRAP_VFUNC(void set_value(guchar* value, gssize length, GDestroyNotify destroy), "set_value")
+ //TODO? (See g_tls_password_set_value_full() comment above): _WRAP_VFUNC(void set_value(guchar* value, gssize length, GDestroyNotify destroy), "set_value")
#m4 _CONVERSION(`Glib::ustring', `const gchar*', `g_strdup($3.c_str())')
_WRAP_VFUNC(Glib::ustring get_default_warning() const, "get_default_warning")
#include <glibmm/arrayhandle.h>
#include <glibmm/balancedtree.h>
+#include <glibmm/bytearray.h>
+#include <glibmm/bytes.h>
#include <glibmm/checksum.h>
#include <glibmm/class.h>
#include <glibmm/containerhandle_shared.h>
--- /dev/null
+/* Copyright (C) 2013 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace
+{
+
+extern "C"
+{
+
+int ByteArray_Compare_Data_Func(gconstpointer a, gconstpointer b,
+ gpointer user_data)
+{
+ Glib::ByteArray::SlotCompare* slot =
+ static_cast<Glib::ByteArray::SlotCompare*>(user_data);
+
+ return (*slot)(static_cast<const guint8*>(a), static_cast<const guint8*>(b));
+}
+
+}
+
+}
+
+namespace Glib
+{
+
+Glib::RefPtr<Glib::ByteArray> ByteArray::create()
+{
+ GByteArray* array = g_byte_array_new();
+ return Glib::wrap(array);
+}
+
+} // namespace Glib
--- /dev/null
+/* Copyright (C) 2013 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+_DEFS(glibmm,glib)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GByteArray GByteArray;
+#endif
+
+namespace Glib
+{
+
+/** ByteArray - Arrays of bytes.
+ * ByteArray is a mutable array of bytes, to provide arrays of bytes which grow
+ * automatically as elements are added.
+ *
+ * To create a new ByteArray use create(). To add elements to a ByteArray, use
+ * append(), and prepend().
+ *
+ * To set the size of a ByteArray, use set_size().
+ *
+ * @newin{2,36}
+ */
+class ByteArray
+{
+ _CLASS_OPAQUE_REFCOUNTED(ByteArray, GByteArray, NONE, g_byte_array_ref, g_byte_array_unref)
+ _IGNORE(g_byte_array_ref, g_byte_array_unref)
+public:
+ /** A Slot type to compare two elements in the array. The slot should return
+ * -1 if the first value is less than the second, 0 if they are equal and 1
+ * if the first value is greater than the second.
+ *
+ * Slot Prototype:
+ *
+ * <code>
+ * int compare(const guint8* first, const guint8* second);
+ * </code>
+ */
+ typedef sigc::slot<int, const guint8*, const guint8*> SlotCompare;
+
+ _WRAP_METHOD_DOCS_ONLY(g_byte_array_new)
+ static Glib::RefPtr<Glib::ByteArray> create();
+
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> append(const guint8* data, guint len), g_byte_array_append)
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> prepend(const guint8* data, guint len), g_byte_array_prepend)
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> remove_index(guint index_), g_byte_array_remove_index)
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> remove_index_fast(guint index_), g_byte_array_remove_index_fast)
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> remove_range(guint index_, guint length), g_byte_array_remove_range)
+
+ _WRAP_METHOD(void sort(const SlotCompare& slot), g_byte_array_sort_with_data, slot_name slot, slot_callback ByteArray_Compare_Data_Func, no_slot_copy)
+ _IGNORE(g_byte_array_sort)
+
+ _WRAP_METHOD(Glib::RefPtr<ByteArray> set_size(guint length), g_byte_array_set_size)
+};
+
+} // namespace Glib
glibmm_files_hg = \
balancedtree.hg \
bytes.hg \
+ bytearray.hg \
checksum.hg \
convert.hg \
date.hg \
; that are mentioned in documentation text.
; (DocsParser.pm:substitute_function(), which uses GtkDefs.pm:lookup_object().)
+(define-object ByteArray
+ (in-module "GLib")
+ (c-name "GByteArray")
+)
+
(define-object Checksum
(in-module "GLib")
(c-name "GChecksum")
# AsyncResult
_CONVERSION(`Glib::RefPtr<Glib::Object>',`GObject*',__CONVERT_REFPTR_TO_P)
-
_CONVERSION(`const Glib::RefPtr<AsyncResult>&',`GAsyncResult*',__CONVERT_REFPTR_TO_P)
_CONVERSION(`Glib::RefPtr<AsyncResult>&',`GAsyncResult*',__CONVERT_REFPTR_TO_P)
+#ByteArray
+_CONVERSION(`const Glib::RefPtr<Glib::ByteArray>&',`GByteArray*',`Glib::unwrap($3)')
+
# Cancellable
_CONVERSION(`const Glib::RefPtr<Cancellable>&',`GCancellable*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`const Glib::RefPtr<Gio::Cancellable>&',`GCancellable*',__CONVERT_CONST_REFPTR_TO_P)
_CONVERSION(`GBytes*',`Glib::RefPtr<const Glib::Bytes>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<const Glib::Bytes>&',`GBytes*',__CONVERT_CONST_REFPTR_TO_P_SUN(Glib::Bytes)))
+dnl ByteArray
+_CONVERSION(`GByteArray*',`Glib::RefPtr<ByteArray>',`Glib::wrap($3)')
+
dnl Regex
_CONVERSION(`GRegex*',`Glib::RefPtr<Regex>',`Glib::wrap($3)')
_CONVERSION(`GRegex*',`Glib::RefPtr<const Regex>',`Glib::wrap($3)')