// Generated by gmmproc 2.39.92 -- DO NOT MODIFY!


#include <glibmm.h>

#include <giomm/tlsdatabase.h>
#include <giomm/private/tlsdatabase_p.h>


/* Copyright (C) 2013 The giomm 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.
 */

#include <gio/gio.h>
#include <giomm/cancellable.h>
#include <giomm/socketconnectable.h>
#include <giomm/tlscertificate.h>
#include <giomm/tlsinteraction.h>
#include "slot_async.h"

namespace
{
} // anonymous namespace

// static
GType Glib::Value<Gio::TlsDatabaseVerifyFlags>::value_type()
{
  return g_tls_database_verify_flags_get_type();
}

// static
GType Glib::Value<Gio::TlsDatabaseLookupFlags>::value_type()
{
  return g_tls_database_lookup_flags_get_type();
}


namespace Glib
{

Glib::RefPtr<Gio::TlsDatabase> wrap(GTlsDatabase* object, bool take_copy)
{
  return Glib::RefPtr<Gio::TlsDatabase>( dynamic_cast<Gio::TlsDatabase*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gio
{


/* The *_Class implementation: */

const Glib::Class& TlsDatabase_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &TlsDatabase_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(g_tls_database_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:

  }

  return *this;
}


void TlsDatabase_Class::class_init_function(void* g_class, void* class_data)
{
  BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);

  klass->verify_chain = &verify_chain_vfunc_callback;
  klass->verify_chain_async = &verify_chain_async_vfunc_callback;
  klass->verify_chain_finish = &verify_chain_finish_vfunc_callback;
  klass->create_certificate_handle = &create_certificate_handle_vfunc_callback;
  klass->lookup_certificate_for_handle = &lookup_certificate_for_handle_vfunc_callback;
  klass->lookup_certificate_for_handle_async = &lookup_certificate_for_handle_async_vfunc_callback;
  klass->lookup_certificate_for_handle_finish = &lookup_certificate_for_handle_finish_vfunc_callback;
  klass->lookup_certificate_issuer = &lookup_certificate_issuer_vfunc_callback;
  klass->lookup_certificate_issuer_async = &lookup_certificate_issuer_async_vfunc_callback;
  klass->lookup_certificate_issuer_finish = &lookup_certificate_issuer_finish_vfunc_callback;
  klass->lookup_certificates_issued_by = &lookup_certificates_issued_by_vfunc_callback;
  klass->lookup_certificates_issued_by_async = &lookup_certificates_issued_by_async_vfunc_callback;
  klass->lookup_certificates_issued_by_finish = &lookup_certificates_issued_by_finish_vfunc_callback;

}

GTlsCertificateFlags TlsDatabase_Class::verify_chain_vfunc_callback(GTlsDatabase* self, GTlsCertificate* chain, const gchar* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return ((GTlsCertificateFlags)(obj->verify_chain_vfunc(Glib::wrap(chain, true)
, Glib::convert_const_gchar_ptr_to_ustring(purpose)
, Glib::wrap(identity, true)
, Glib::wrap(interaction, true)
, Glib::wrap(cancellable)
, ((TlsDatabaseVerifyFlags)(flags))
)));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->verify_chain)
  {
    GTlsCertificateFlags retval = (*base->verify_chain)(self, chain, purpose, identity, interaction, flags, cancellable, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificateFlags RType;
  return RType();
}
void TlsDatabase_Class::verify_chain_async_vfunc_callback(GTlsDatabase* self, GTlsCertificate* chain, const gchar* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  const Gio::SlotAsyncReady* slot = static_cast<Gio::SlotAsyncReady*>(user_data);

  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->verify_chain_async_vfunc(Glib::wrap(chain, true)
, Glib::convert_const_gchar_ptr_to_ustring(purpose)
, Glib::wrap(identity, true)
, Glib::wrap(interaction, true)
, *slot, Glib::wrap(cancellable)
, ((TlsDatabaseVerifyFlags)(flags))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->verify_chain_async)
  {
    (*base->verify_chain_async)(self, chain, purpose, identity, interaction, flags, cancellable, callback, user_data);
  }

}
GTlsCertificateFlags TlsDatabase_Class::verify_chain_finish_vfunc_callback(GTlsDatabase* self, GAsyncResult* result, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return ((GTlsCertificateFlags)(obj->verify_chain_finish_vfunc(Glib::wrap(result, true)
)));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->verify_chain_finish)
  {
    GTlsCertificateFlags retval = (*base->verify_chain_finish)(self, result, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificateFlags RType;
  return RType();
}
gchar* TlsDatabase_Class::create_certificate_handle_vfunc_callback(GTlsDatabase* self, GTlsCertificate* certificate)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return g_strdup((obj->create_certificate_handle_vfunc(Glib::wrap(certificate, true)
)).c_str());
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->create_certificate_handle)
  {
    gchar* retval = (*base->create_certificate_handle)(self, certificate);
    return retval;
  }

  typedef gchar* RType;
  return RType();
}
GTlsCertificate* TlsDatabase_Class::lookup_certificate_for_handle_vfunc_callback(GTlsDatabase* self, const gchar* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap(obj->lookup_certificate_for_handle_vfunc(Glib::convert_const_gchar_ptr_to_ustring(handle)
, Glib::wrap(interaction, true)
, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
))));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_for_handle)
  {
    GTlsCertificate* retval = (*base->lookup_certificate_for_handle)(self, handle, interaction, flags, cancellable, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificate* RType;
  return RType();
}
void TlsDatabase_Class::lookup_certificate_for_handle_async_vfunc_callback(GTlsDatabase* self, const gchar* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  const Gio::SlotAsyncReady* slot = static_cast<Gio::SlotAsyncReady*>(user_data);

  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->lookup_certificate_for_handle_async_vfunc(Glib::convert_const_gchar_ptr_to_ustring(handle)
, Glib::wrap(interaction, true)
, *slot, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_for_handle_async)
  {
    (*base->lookup_certificate_for_handle_async)(self, handle, interaction, flags, cancellable, callback, user_data);
  }

}
GTlsCertificate* TlsDatabase_Class::lookup_certificate_for_handle_finish_vfunc_callback(GTlsDatabase* self, GAsyncResult* result, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap(obj->lookup_certificate_for_handle_finish_vfunc(Glib::wrap(result, true)
))));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_for_handle_finish)
  {
    GTlsCertificate* retval = (*base->lookup_certificate_for_handle_finish)(self, result, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificate* RType;
  return RType();
}
GTlsCertificate* TlsDatabase_Class::lookup_certificate_issuer_vfunc_callback(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap(obj->lookup_certificate_issuer_vfunc(Glib::wrap(certificate, true)
, Glib::wrap(interaction, true)
, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
))));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_issuer)
  {
    GTlsCertificate* retval = (*base->lookup_certificate_issuer)(self, certificate, interaction, flags, cancellable, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificate* RType;
  return RType();
}
void TlsDatabase_Class::lookup_certificate_issuer_async_vfunc_callback(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  const Gio::SlotAsyncReady* slot = static_cast<Gio::SlotAsyncReady*>(user_data);

  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->lookup_certificate_issuer_async_vfunc(Glib::wrap(certificate, true)
, Glib::wrap(interaction, true)
, *slot, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_issuer_async)
  {
    (*base->lookup_certificate_issuer_async)(self, certificate, interaction, flags, cancellable, callback, user_data);
  }

}
GTlsCertificate* TlsDatabase_Class::lookup_certificate_issuer_finish_vfunc_callback(GTlsDatabase* self, GAsyncResult* result, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return G_TLS_CERTIFICATE(g_object_ref(Glib::unwrap(obj->lookup_certificate_issuer_finish_vfunc(Glib::wrap(result, true)
))));
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificate_issuer_finish)
  {
    GTlsCertificate* retval = (*base->lookup_certificate_issuer_finish)(self, result, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GTlsCertificate* RType;
  return RType();
}
GList* TlsDatabase_Class::lookup_certificates_issued_by_vfunc_callback(GTlsDatabase* self, GByteArray* issuer_raw_dn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return g_list_copy(Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::vector_to_list(obj->lookup_certificates_issued_by_vfunc(Glib::wrap(issuer_raw_dn, true)
, Glib::wrap(interaction, true)
, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
)).data());
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificates_issued_by)
  {
    GList* retval = (*base->lookup_certificates_issued_by)(self, issuer_raw_dn, interaction, flags, cancellable, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GList* RType;
  return RType();
}
void TlsDatabase_Class::lookup_certificates_issued_by_async_vfunc_callback(GTlsDatabase* self, GByteArray* issuer_raw_dn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, gpointer user_data)
{
  const Gio::SlotAsyncReady* slot = static_cast<Gio::SlotAsyncReady*>(user_data);

  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        obj->lookup_certificates_issued_by_async_vfunc(Glib::wrap(issuer_raw_dn, true)
, Glib::wrap(interaction, true)
, *slot, Glib::wrap(cancellable)
, ((TlsDatabaseLookupFlags)(flags))
);
        return;
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificates_issued_by_async)
  {
    (*base->lookup_certificates_issued_by_async)(self, issuer_raw_dn, interaction, flags, cancellable, callback, user_data);
  }

}
GList* TlsDatabase_Class::lookup_certificates_issued_by_finish_vfunc_callback(GTlsDatabase* self, GAsyncResult* result, GError** error)
{
  Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
      #endif //GLIBMM_EXCEPTIONS_ENABLED
        // Call the virtual member method, which derived classes might override.
        return g_list_copy(Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::vector_to_list(obj->lookup_certificates_issued_by_finish_vfunc(Glib::wrap(result, true)
)).data());
      #ifdef GLIBMM_EXCEPTIONS_ENABLED
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
      #endif //GLIBMM_EXCEPTIONS_ENABLED
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
  );

  // Call the original underlying C function:
  if(base && base->lookup_certificates_issued_by_finish)
  {
    GList* retval = (*base->lookup_certificates_issued_by_finish)(self, result, error);
    if(*error)
      ::Glib::Error::throw_exception(*error);
    return retval;
  }

  typedef GList* RType;
  return RType();
}


Glib::ObjectBase* TlsDatabase_Class::wrap_new(GObject* object)
{
  return new TlsDatabase((GTlsDatabase*)object);
}


/* The implementation: */

GTlsDatabase* TlsDatabase::gobj_copy()
{
  reference();
  return gobj();
}

TlsDatabase::TlsDatabase(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

TlsDatabase::TlsDatabase(GTlsDatabase* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


TlsDatabase::~TlsDatabase()
{}


TlsDatabase::CppClassType TlsDatabase::tlsdatabase_class_; // initialize static member

GType TlsDatabase::get_type()
{
  return tlsdatabase_class_.init().get_type();
}


GType TlsDatabase::get_base_type()
{
  return g_tls_database_get_type();
}


TlsDatabase::TlsDatabase()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(0),
  Glib::Object(Glib::ConstructParams(tlsdatabase_class_.init()))
{
  

}

TlsCertificateFlags TlsDatabase::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) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::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
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), 0, &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), 0, ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), 0, ((GTlsDatabaseVerifyFlags)(flags)), 0, &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), 0, &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, 0, ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

TlsCertificateFlags TlsDatabase::verify_chain(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, TlsDatabaseVerifyFlags flags) const
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, 0, ((GTlsDatabaseVerifyFlags)(flags)), 0, &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

void TlsDatabase::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, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::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, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), 0, ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const SlotAsyncReady& slot, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), const_cast<GSocketConnectable*>(Glib::unwrap(identity)), 0, ((GTlsDatabaseVerifyFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, Glib::unwrap(interaction), ((GTlsDatabaseVerifyFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, 0, ((GTlsDatabaseVerifyFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::verify_chain_async(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const SlotAsyncReady& slot, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_verify_chain_async(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(chain), purpose.c_str(), 0, 0, ((GTlsDatabaseVerifyFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

TlsCertificateFlags TlsDatabase::verify_chain_finish(const Glib::RefPtr<AsyncResult>& result)
{
  GError* gerror = 0;
  TlsCertificateFlags retvalue = ((TlsCertificateFlags)(g_tls_database_verify_chain_finish(gobj(), Glib::unwrap(result), &(gerror))));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_issuer(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_issuer(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_issuer(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_issuer(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_issuer(certificate, interaction, cancellable, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_issuer(certificate, interaction, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_issuer(certificate, cancellable, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_issuer(const Glib::RefPtr<const TlsCertificate>& certificate, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_issuer(certificate, flags);
}

void TlsDatabase::lookup_certificate_issuer_async(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_issuer_async(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_issuer_async(const Glib::RefPtr<const TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_issuer_async(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_issuer_async(const Glib::RefPtr<const TlsCertificate>& certificate, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_issuer_async(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_issuer_async(const Glib::RefPtr<const TlsCertificate>& certificate, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_issuer_async(gobj(), const_cast<GTlsCertificate*>(Glib::unwrap(certificate)), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_issuer_finish(const Glib::RefPtr<AsyncResult>& result)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_issuer_finish(gobj(), Glib::unwrap(result), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(gobj(), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(gobj(), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(gobj(), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(gobj(), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<const TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<const TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<const TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<const TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags) const
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<const TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<const TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<const TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<const TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<const TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

std::vector< Glib::RefPtr<const TlsCertificate> > TlsDatabase::lookup_certificates_issued_by(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, TlsDatabaseLookupFlags flags) const
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<const TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<const TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by(const_cast<GTlsDatabase*>(gobj()), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

void TlsDatabase::lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificates_issued_by_async(gobj(), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificates_issued_by_async(gobj(), Glib::unwrap(issuer_raw_dn), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificates_issued_by_async(gobj(), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificates_issued_by_async(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificates_issued_by_async(gobj(), Glib::unwrap(issuer_raw_dn), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

std::vector< Glib::RefPtr<TlsCertificate> > TlsDatabase::lookup_certificates_issued_by_finish(const Glib::RefPtr<AsyncResult>& result)
{
  GError* gerror = 0;
  std::vector< Glib::RefPtr<TlsCertificate> > retvalue = Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector(g_tls_database_lookup_certificates_issued_by_finish(gobj(), Glib::unwrap(result), &(gerror)), Glib::OWNERSHIP_DEEP);
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::ustring TlsDatabase::create_certificate_handle(const Glib::RefPtr<const TlsCertificate>& certificate) const
{
  return Glib::convert_return_gchar_ptr_to_ustring(g_tls_database_create_certificate_handle(const_cast<GTlsDatabase*>(gobj()), const_cast<GTlsCertificate*>(Glib::unwrap(certificate))));
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_for_handle(gobj(), handle.c_str(), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_for_handle(gobj(), handle.c_str(), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_for_handle(gobj(), handle.c_str(), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, TlsDatabaseLookupFlags flags)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_for_handle(gobj(), handle.c_str(), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_for_handle(handle, interaction, cancellable, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_for_handle(handle, interaction, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_for_handle(handle, cancellable, flags);
}

Glib::RefPtr<const TlsCertificate> TlsDatabase::lookup_certificate_for_handle(const Glib::ustring& handle, TlsDatabaseLookupFlags flags) const
{
  return const_cast<TlsDatabase*>(this)->lookup_certificate_for_handle(handle, flags);
}

void TlsDatabase::lookup_certificate_for_handle_async(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_for_handle_async(gobj(), handle.c_str(), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_for_handle_async(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_for_handle_async(gobj(), handle.c_str(), Glib::unwrap(interaction), ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_for_handle_async(const Glib::ustring& handle, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_for_handle_async(gobj(), handle.c_str(), 0, ((GTlsDatabaseLookupFlags)(flags)), const_cast<GCancellable*>(Glib::unwrap(cancellable)), &SignalProxy_async_callback, slot_copy);
}

void TlsDatabase::lookup_certificate_for_handle_async(const Glib::ustring& handle, const SlotAsyncReady& slot, TlsDatabaseLookupFlags flags)
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  g_tls_database_lookup_certificate_for_handle_async(gobj(), handle.c_str(), 0, ((GTlsDatabaseLookupFlags)(flags)), 0, &SignalProxy_async_callback, slot_copy);
}

Glib::RefPtr<TlsCertificate> TlsDatabase::lookup_certificate_for_handle_finish(const Glib::RefPtr<AsyncResult>& result)
{
  GError* gerror = 0;
  Glib::RefPtr<TlsCertificate> retvalue = Glib::wrap(g_tls_database_lookup_certificate_for_handle_finish(gobj(), Glib::unwrap(result), &(gerror)));
  if(gerror)
    ::Glib::Error::throw_exception(gerror);
  return retvalue;
}


TlsCertificateFlags Gio::TlsDatabase::verify_chain_vfunc(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) const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->verify_chain)
  {
    GError* gerror = 0;
    TlsCertificateFlags retval(((TlsCertificateFlags)((*base->verify_chain)(const_cast<GTlsDatabase*>(gobj()),Glib::unwrap(chain),purpose.c_str(),const_cast<GSocketConnectable*>(Glib::unwrap(identity)),Glib::unwrap(interaction),((GTlsDatabaseVerifyFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&(gerror)))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef TlsCertificateFlags RType;
  return RType();
}
void Gio::TlsDatabase::verify_chain_async_vfunc(const Glib::RefPtr<TlsCertificate>& chain, const Glib::ustring& purpose, const Glib::RefPtr<const SocketConnectable>& identity, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseVerifyFlags flags) const
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->verify_chain_async)
  {
    (*base->verify_chain_async)(const_cast<GTlsDatabase*>(gobj()),Glib::unwrap(chain),purpose.c_str(),const_cast<GSocketConnectable*>(Glib::unwrap(identity)),Glib::unwrap(interaction),((GTlsDatabaseVerifyFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&SignalProxy_async_callback,slot_copy);
  }
}
TlsCertificateFlags Gio::TlsDatabase::verify_chain_finish_vfunc(const Glib::RefPtr<AsyncResult>& result) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->verify_chain_finish)
  {
    GError* gerror = 0;
    TlsCertificateFlags retval(((TlsCertificateFlags)((*base->verify_chain_finish)(gobj(),Glib::unwrap(result),&(gerror)))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef TlsCertificateFlags RType;
  return RType();
}
Glib::ustring Gio::TlsDatabase::create_certificate_handle_vfunc(const Glib::RefPtr<const TlsCertificate>& certificate) const
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->create_certificate_handle)
  {
    Glib::ustring retval(Glib::convert_const_gchar_ptr_to_ustring((*base->create_certificate_handle)(const_cast<GTlsDatabase*>(gobj()),const_cast<GTlsCertificate*>(Glib::unwrap(certificate)))));
    return retval;
  }

  typedef Glib::ustring RType;
  return RType();
}
Glib::RefPtr<TlsCertificate> Gio::TlsDatabase::lookup_certificate_for_handle_vfunc(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_for_handle)
  {
    GError* gerror = 0;
    Glib::RefPtr<TlsCertificate> retval(Glib::wrap((*base->lookup_certificate_for_handle)(gobj(),handle.c_str(),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&(gerror))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef Glib::RefPtr<TlsCertificate> RType;
  return RType();
}
void Gio::TlsDatabase::lookup_certificate_for_handle_async_vfunc(const Glib::ustring& handle, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_for_handle_async)
  {
    (*base->lookup_certificate_for_handle_async)(gobj(),handle.c_str(),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&SignalProxy_async_callback,slot_copy);
  }
}
Glib::RefPtr<TlsCertificate> Gio::TlsDatabase::lookup_certificate_for_handle_finish_vfunc(const Glib::RefPtr<AsyncResult>& result) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_for_handle_finish)
  {
    GError* gerror = 0;
    Glib::RefPtr<TlsCertificate> retval(Glib::wrap((*base->lookup_certificate_for_handle_finish)(gobj(),Glib::unwrap(result),&(gerror))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef Glib::RefPtr<TlsCertificate> RType;
  return RType();
}
Glib::RefPtr<TlsCertificate> Gio::TlsDatabase::lookup_certificate_issuer_vfunc(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_issuer)
  {
    GError* gerror = 0;
    Glib::RefPtr<TlsCertificate> retval(Glib::wrap((*base->lookup_certificate_issuer)(gobj(),Glib::unwrap(certificate),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&(gerror))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef Glib::RefPtr<TlsCertificate> RType;
  return RType();
}
void Gio::TlsDatabase::lookup_certificate_issuer_async_vfunc(const Glib::RefPtr<TlsCertificate>& certificate, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_issuer_async)
  {
    (*base->lookup_certificate_issuer_async)(gobj(),Glib::unwrap(certificate),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&SignalProxy_async_callback,slot_copy);
  }
}
Glib::RefPtr<TlsCertificate> Gio::TlsDatabase::lookup_certificate_issuer_finish_vfunc(const Glib::RefPtr<AsyncResult>& result) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificate_issuer_finish)
  {
    GError* gerror = 0;
    Glib::RefPtr<TlsCertificate> retval(Glib::wrap((*base->lookup_certificate_issuer_finish)(gobj(),Glib::unwrap(result),&(gerror))));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef Glib::RefPtr<TlsCertificate> RType;
  return RType();
}
std::vector< Glib::RefPtr<TlsCertificate> > Gio::TlsDatabase::lookup_certificates_issued_by_vfunc(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificates_issued_by)
  {
    GError* gerror = 0;
    std::vector< Glib::RefPtr<TlsCertificate> > retval(Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector((*base->lookup_certificates_issued_by)(gobj(),Glib::unwrap(issuer_raw_dn),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&(gerror)), Glib::OWNERSHIP_DEEP));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef std::vector< Glib::RefPtr<TlsCertificate> > RType;
  return RType();
}
void Gio::TlsDatabase::lookup_certificates_issued_by_async_vfunc(const Glib::RefPtr<Glib::ByteArray>& issuer_raw_dn, const Glib::RefPtr<TlsInteraction>& interaction, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, TlsDatabaseLookupFlags flags) 
{
  // Create a copy of the slot.
  SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); 

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificates_issued_by_async)
  {
    (*base->lookup_certificates_issued_by_async)(gobj(),Glib::unwrap(issuer_raw_dn),Glib::unwrap(interaction),((GTlsDatabaseLookupFlags)(flags)),const_cast<GCancellable*>(Glib::unwrap(cancellable)),&SignalProxy_async_callback,slot_copy);
  }
}
std::vector< Glib::RefPtr<TlsCertificate> > Gio::TlsDatabase::lookup_certificates_issued_by_finish_vfunc(const Glib::RefPtr<AsyncResult>& result) 
{
  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
  );

  if(base && base->lookup_certificates_issued_by_finish)
  {
    GError* gerror = 0;
    std::vector< Glib::RefPtr<TlsCertificate> > retval(Glib::ListHandler< Glib::RefPtr<TlsCertificate> >::list_to_vector((*base->lookup_certificates_issued_by_finish)(gobj(),Glib::unwrap(result),&(gerror)), Glib::OWNERSHIP_DEEP));
    if(gerror)
      ::Glib::Error::throw_exception(gerror);
    return retval;
  }

  typedef std::vector< Glib::RefPtr<TlsCertificate> > RType;
  return RType();
}


} // namespace Gio


