
/*

  KLayout Layout Viewer
  Copyright (C) 2006-2016 Matthias Koefferlein

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program 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 General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

*/

/**
*  @file gsiDeclQNetworkProxyFactory.cc 
*
*  DO NOT EDIT THIS FILE. 
*  This file has been created automatically
*/

#include "gsiQtNetwork.h"
#include "gsiDeclQtTypeTraits.h"
#include "gsiDeclQNetworkProxyFactory_Enums.h"
#include <memory>

// -----------------------------------------------------------------------
// class QNetworkProxyFactory

// QList<QNetworkProxy> QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)


static void _init_f_queryProxy_3220 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("query", true, "QNetworkProxyQuery()");
  decl->add_arg<const QNetworkProxyQuery & > (argspec_0);
  decl->set_return<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ();
}

static void _call_f_queryProxy_3220 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QNetworkProxyQuery &arg1 = args ? args.read<const QNetworkProxyQuery & > () : (const QNetworkProxyQuery &)(QNetworkProxyQuery());
  ret.write<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ((qt_gsi::Converter<QList<QNetworkProxy> >::target_type)qt_gsi::CppToQtAdaptor<QList<QNetworkProxy> >(((QNetworkProxyFactory *)cls)->queryProxy (arg1)));
}

static qt_gsi::GenericMethod *_create_f_queryProxy_3220 ()
{
  return new qt_gsi::GenericMethod ("queryProxy", "@brief Method QList<QNetworkProxy> QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)\n", false, &_init_f_queryProxy_3220, &_call_f_queryProxy_3220);
}

// static QList<QNetworkProxy> QNetworkProxyFactory::proxyForQuery(const QNetworkProxyQuery &query)


static void _init_f_proxyForQuery_3220 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("query");
  decl->add_arg<const QNetworkProxyQuery & > (argspec_0);
  decl->set_return<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ();
}

static void _call_f_proxyForQuery_3220 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QNetworkProxyQuery &arg1 = args.read<const QNetworkProxyQuery & > ();
  ret.write<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ((qt_gsi::Converter<QList<QNetworkProxy> >::target_type)qt_gsi::CppToQtAdaptor<QList<QNetworkProxy> >(QNetworkProxyFactory::proxyForQuery (arg1)));
}

static qt_gsi::GenericStaticMethod *_create_f_proxyForQuery_3220 ()
{
  return new qt_gsi::GenericStaticMethod ("proxyForQuery", "@brief Static method QList<QNetworkProxy> QNetworkProxyFactory::proxyForQuery(const QNetworkProxyQuery &query)\nThis method is static and can be called without an instance.", &_init_f_proxyForQuery_3220, &_call_f_proxyForQuery_3220);
}

// static void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *factory)


static void _init_f_setApplicationProxyFactory_2723 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("factory");
  decl->add_arg<QNetworkProxyFactory * > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setApplicationProxyFactory_2723 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  QNetworkProxyFactory *arg1 = args.read<QNetworkProxyFactory * > ();
  QNetworkProxyFactory::setApplicationProxyFactory (arg1);
}

static qt_gsi::GenericStaticMethod *_create_f_setApplicationProxyFactory_2723 ()
{
  return new qt_gsi::GenericStaticMethod ("setApplicationProxyFactory", "@brief Static method void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *factory)\nThis method is static and can be called without an instance.", &_init_f_setApplicationProxyFactory_2723, &_call_f_setApplicationProxyFactory_2723);
}

// static void QNetworkProxyFactory::setUseSystemConfiguration(bool enable)


static void _init_f_setUseSystemConfiguration_864 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("enable");
  decl->add_arg<bool > (argspec_0);
  decl->set_return<void > ();
}

static void _call_f_setUseSystemConfiguration_864 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  bool arg1 = args.read<bool > ();
  QNetworkProxyFactory::setUseSystemConfiguration (arg1);
}

static qt_gsi::GenericStaticMethod *_create_f_setUseSystemConfiguration_864 ()
{
  return new qt_gsi::GenericStaticMethod ("setUseSystemConfiguration", "@brief Static method void QNetworkProxyFactory::setUseSystemConfiguration(bool enable)\nThis method is static and can be called without an instance.", &_init_f_setUseSystemConfiguration_864, &_call_f_setUseSystemConfiguration_864);
}

// static QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &query)


static void _init_f_systemProxyForQuery_3220 (qt_gsi::GenericStaticMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("query", true, "QNetworkProxyQuery()");
  decl->add_arg<const QNetworkProxyQuery & > (argspec_0);
  decl->set_return<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ();
}

static void _call_f_systemProxyForQuery_3220 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QNetworkProxyQuery &arg1 = args ? args.read<const QNetworkProxyQuery & > () : (const QNetworkProxyQuery &)(QNetworkProxyQuery());
  ret.write<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ((qt_gsi::Converter<QList<QNetworkProxy> >::target_type)qt_gsi::CppToQtAdaptor<QList<QNetworkProxy> >(QNetworkProxyFactory::systemProxyForQuery (arg1)));
}

static qt_gsi::GenericStaticMethod *_create_f_systemProxyForQuery_3220 ()
{
  return new qt_gsi::GenericStaticMethod ("systemProxyForQuery", "@brief Static method QList<QNetworkProxy> QNetworkProxyFactory::systemProxyForQuery(const QNetworkProxyQuery &query)\nThis method is static and can be called without an instance.", &_init_f_systemProxyForQuery_3220, &_call_f_systemProxyForQuery_3220);
}

namespace gsi
{
gsi::Class<QNetworkProxyFactory> decl_QNetworkProxyFactory ("QNetworkProxyFactory_Native",
  gsi::Methods(_create_f_queryProxy_3220 ()) +
  gsi::Methods(_create_f_proxyForQuery_3220 ()) +
  gsi::Methods(_create_f_setApplicationProxyFactory_2723 ()) +
  gsi::Methods(_create_f_setUseSystemConfiguration_864 ()) +
  gsi::Methods(_create_f_systemProxyForQuery_3220 ()),
  "@hide\n@alias QNetworkProxyFactory");
}


class QNetworkProxyFactory_Adaptor : public QNetworkProxyFactory, public qt_gsi::QtObjectBase
{
public:

  virtual ~QNetworkProxyFactory_Adaptor();

  //  [adaptor ctor] QNetworkProxyFactory::QNetworkProxyFactory()
  QNetworkProxyFactory_Adaptor() : QNetworkProxyFactory()
  {
    qt_gsi::QtObjectBase::init (this);
  }

  //  [adaptor impl] QList<QNetworkProxy> QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)
  qt_gsi::Converter<QList<QNetworkProxy> >::target_type cbs_queryProxy_3220_1(const QNetworkProxyQuery &query)
  {
    throw qt_gsi::AbstractMethodCalledException("queryProxy");
  }

  virtual QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query)
  {
    if (cb_queryProxy_3220_1.can_issue()) {
      return qt_gsi::QtToCppAdaptor<QList<QNetworkProxy> >(cb_queryProxy_3220_1.issue<QNetworkProxyFactory_Adaptor, qt_gsi::Converter<QList<QNetworkProxy> >::target_type, const QNetworkProxyQuery &>(&QNetworkProxyFactory_Adaptor::cbs_queryProxy_3220_1, query)).cref();
    } else {
      throw qt_gsi::AbstractMethodCalledException("queryProxy");
    }
  }

  gsi::Callback cb_queryProxy_3220_1;
};

QNetworkProxyFactory_Adaptor::~QNetworkProxyFactory_Adaptor() { }

//  Constructor QNetworkProxyFactory::QNetworkProxyFactory() (adaptor class)

static void _init_ctor_QNetworkProxyFactory_Adaptor_0 (qt_gsi::GenericStaticMethod *decl)
{
  decl->set_return_new<QNetworkProxyFactory_Adaptor *> ();
}

static void _call_ctor_QNetworkProxyFactory_Adaptor_0 (const qt_gsi::GenericStaticMethod *decl, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  ret.write<QNetworkProxyFactory_Adaptor *> (new QNetworkProxyFactory_Adaptor ());
}

static qt_gsi::GenericStaticMethod *_create_ctor_QNetworkProxyFactory_Adaptor_0 ()
{
  return new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QNetworkProxyFactory::QNetworkProxyFactory()\nThis method creates an object of class QNetworkProxyFactory.", &_init_ctor_QNetworkProxyFactory_Adaptor_0, &_call_ctor_QNetworkProxyFactory_Adaptor_0);
}

// QList<QNetworkProxy> QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)

static void _init_cbs_queryProxy_3220_1 (qt_gsi::GenericMethod *decl)
{
  static gsi::ArgSpecBase argspec_0 ("query");
  decl->add_arg<const QNetworkProxyQuery & > (argspec_0);
  decl->set_return<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ();
}

static void _call_cbs_queryProxy_3220_1 (const qt_gsi::GenericMethod *decl, void *cls, gsi::SerialArgs &args, gsi::SerialArgs &ret) 
{
  const QNetworkProxyQuery &arg1 = args.read<const QNetworkProxyQuery & > ();
  ret.write<qt_gsi::Converter<QList<QNetworkProxy> >::target_type > ((qt_gsi::Converter<QList<QNetworkProxy> >::target_type)((QNetworkProxyFactory_Adaptor *)cls)->cbs_queryProxy_3220_1 (arg1));
}

static void _set_callback_cbs_queryProxy_3220_1 (void *cls, const gsi::Callback &cb)
{
  ((QNetworkProxyFactory_Adaptor *)cls)->cb_queryProxy_3220_1 = cb;
}

static qt_gsi::GenericMethod *_create_cbs_queryProxy_3220_1 ()
{
  return new qt_gsi::GenericMethod ("queryProxy", "@hide", false, &_init_cbs_queryProxy_3220_1, &_call_cbs_queryProxy_3220_1);
}

static qt_gsi::GenericMethod *_create_callback_cbs_queryProxy_3220_1 ()
{
  return new qt_gsi::GenericMethod ("queryProxy", "@brief Virtual method QList<QNetworkProxy> QNetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)\nThis method can be reimplemented in a derived class.", false, &_init_cbs_queryProxy_3220_1, &_call_cbs_queryProxy_3220_1, &_set_callback_cbs_queryProxy_3220_1);
}


namespace gsi
{

extern gsi::Class<QNetworkProxyFactory> decl_QNetworkProxyFactory;

gsi::Class<QNetworkProxyFactory_Adaptor> decl_QNetworkProxyFactory_Adaptor (decl_QNetworkProxyFactory, "QNetworkProxyFactory",
  gsi::Methods(_create_cbs_queryProxy_3220_1 ()) +
  gsi::Methods(_create_callback_cbs_queryProxy_3220_1 ()) +
  gsi::Methods(_create_ctor_QNetworkProxyFactory_Adaptor_0 ()),
  "@qt\n@brief Binding of QNetworkProxyFactory");

}

