/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt5.
 * 
 * This file may be used under the terms of the GNU General Public License
 * version 3.0 as published by the Free Software Foundation and appearing in
 * the file LICENSE included in the packaging of this file.  Please review the
 * following information to ensure the GNU General Public License version 3.0
 * requirements will be met: http://www.gnu.org/copyleft/gpl.html.
 * 
 * If you do not wish to use this file under the terms of the GPL version 3.0
 * then you may purchase a commercial license.  For more information contact
 * info@riverbankcomputing.com.
 * 
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 */

#include "sipAPIQtQml.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtQml/qqmlnetworkaccessmanagerfactory.sip"
#include <qqmlnetworkaccessmanagerfactory.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQQmlNetworkAccessManagerFactory.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtNetwork/qnetworkaccessmanager.sip"
#include <qnetworkaccessmanager.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQQmlNetworkAccessManagerFactory.cpp"
#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtQml/sipQtQmlQQmlNetworkAccessManagerFactory.cpp"


class sipQQmlNetworkAccessManagerFactory : public  ::QQmlNetworkAccessManagerFactory
{
public:
    sipQQmlNetworkAccessManagerFactory();
    sipQQmlNetworkAccessManagerFactory(const  ::QQmlNetworkAccessManagerFactory&);
    virtual ~sipQQmlNetworkAccessManagerFactory();

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
     ::QNetworkAccessManager* create( ::QObject*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQQmlNetworkAccessManagerFactory(const sipQQmlNetworkAccessManagerFactory &);
    sipQQmlNetworkAccessManagerFactory &operator = (const sipQQmlNetworkAccessManagerFactory &);

    char sipPyMethods[1];
};

sipQQmlNetworkAccessManagerFactory::sipQQmlNetworkAccessManagerFactory():  ::QQmlNetworkAccessManagerFactory(), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQQmlNetworkAccessManagerFactory::sipQQmlNetworkAccessManagerFactory(const  ::QQmlNetworkAccessManagerFactory& a0):  ::QQmlNetworkAccessManagerFactory(a0), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQQmlNetworkAccessManagerFactory::~sipQQmlNetworkAccessManagerFactory()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

 ::QNetworkAccessManager* sipQQmlNetworkAccessManagerFactory::create( ::QObject*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, sipName_QQmlNetworkAccessManagerFactory, sipName_create);

    if (!sipMeth)
        return 0;

    extern  ::QNetworkAccessManager* sipVH_QtQml_16(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*);

    return sipVH_QtQml_16(sipGILState, sipImportedVirtErrorHandlers_QtQml_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


PyDoc_STRVAR(doc_QQmlNetworkAccessManagerFactory_create, "create(self, QObject) -> QNetworkAccessManager");

extern "C" {static PyObject *meth_QQmlNetworkAccessManagerFactory_create(PyObject *, PyObject *);}
static PyObject *meth_QQmlNetworkAccessManagerFactory_create(PyObject *sipSelf, PyObject *sipArgs)
{
    PyObject *sipParseErr = SIP_NULLPTR;
    PyObject *sipOrigSelf = sipSelf;

    {
         ::QObject* a0;
         ::QQmlNetworkAccessManagerFactory *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ8", &sipSelf, sipType_QQmlNetworkAccessManagerFactory, &sipCpp, sipType_QObject, &a0))
        {
             ::QNetworkAccessManager*sipRes;

            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QQmlNetworkAccessManagerFactory, sipName_create);
                return SIP_NULLPTR;
            }

            sipRes = sipCpp->create(a0);

            return sipConvertFromType(sipRes,sipType_QNetworkAccessManager,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QQmlNetworkAccessManagerFactory, sipName_create, doc_QQmlNetworkAccessManagerFactory_create);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QQmlNetworkAccessManagerFactory(void *, int);}
static void release_QQmlNetworkAccessManagerFactory(void *sipCppV, int sipState)
{
    if (sipState & SIP_DERIVED_CLASS)
        delete reinterpret_cast<sipQQmlNetworkAccessManagerFactory *>(sipCppV);
    else
        delete reinterpret_cast< ::QQmlNetworkAccessManagerFactory *>(sipCppV);
}


extern "C" {static void dealloc_QQmlNetworkAccessManagerFactory(sipSimpleWrapper *);}
static void dealloc_QQmlNetworkAccessManagerFactory(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQQmlNetworkAccessManagerFactory *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QQmlNetworkAccessManagerFactory(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QQmlNetworkAccessManagerFactory(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QQmlNetworkAccessManagerFactory(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
    sipQQmlNetworkAccessManagerFactory *sipCpp = SIP_NULLPTR;

    {
        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, ""))
        {
            sipCpp = new sipQQmlNetworkAccessManagerFactory();

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    {
        const  ::QQmlNetworkAccessManagerFactory* a0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J9", sipType_QQmlNetworkAccessManagerFactory, &a0))
        {
            sipCpp = new sipQQmlNetworkAccessManagerFactory(*a0);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QQmlNetworkAccessManagerFactory[] = {
    {sipName_create, meth_QQmlNetworkAccessManagerFactory_create, METH_VARARGS, doc_QQmlNetworkAccessManagerFactory_create}
};

PyDoc_STRVAR(doc_QQmlNetworkAccessManagerFactory, "\1QQmlNetworkAccessManagerFactory()\n"
"QQmlNetworkAccessManagerFactory(QQmlNetworkAccessManagerFactory)");


static pyqt5ClassPluginDef plugin_QQmlNetworkAccessManagerFactory = {
    SIP_NULLPTR,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtQml_QQmlNetworkAccessManagerFactory = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QQmlNetworkAccessManagerFactory,
        SIP_NULLPTR,
        &plugin_QQmlNetworkAccessManagerFactory
    },
    {
        sipNameNr_QQmlNetworkAccessManagerFactory,
        {0, 0, 1},
        1, methods_QQmlNetworkAccessManagerFactory,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QQmlNetworkAccessManagerFactory,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QQmlNetworkAccessManagerFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QQmlNetworkAccessManagerFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QQmlNetworkAccessManagerFactory,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QQmlNetworkAccessManagerFactory),
};
