/*
 * 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 "sipAPIQtXmlPatterns.h"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlschemavalidator.sip"
#include <qxmlschemavalidator.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlschema.sip"
#include <qxmlschema.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtNetwork/qnetworkaccessmanager.sip"
#include <qnetworkaccessmanager.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qabstracturiresolver.sip"
#include <qabstracturiresolver.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qabstractmessagehandler.sip"
#include <qabstractmessagehandler.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlnamepool.sip"
#include <qxmlnamepool.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 109 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 48 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qiodevice.sip"
#include <qiodevice.h>
#line 51 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 54 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"


PyDoc_STRVAR(doc_QXmlSchemaValidator_setSchema, "setSchema(self, QXmlSchema)");

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

    {
        const  ::QXmlSchema* a0;
         ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, sipType_QXmlSchema, &a0))
        {
            sipCpp->setSchema(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_setSchema, doc_QXmlSchemaValidator_setSchema);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_validate, "validate(self, QUrl) -> bool\n"
"validate(self, QIODevice, documentUri: QUrl = QUrl()) -> bool\n"
"validate(self, Union[QByteArray, bytes, bytearray], documentUri: QUrl = QUrl()) -> bool");

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

    {
        const  ::QUrl* a0;
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ9", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, sipType_QUrl, &a0))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->validate(*a0);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    {
         ::QIODevice* a0;
        const  ::QUrl& a1def = QUrl();
        const  ::QUrl* a1 = &a1def;
        const  ::QXmlSchemaValidator *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_documentUri,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ8|J9", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, sipType_QIODevice, &a0, sipType_QUrl, &a1))
        {
            bool sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->validate(a0,*a1);
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    {
        const  ::QByteArray* a0;
        int a0State = 0;
        const  ::QUrl& a1def = QUrl();
        const  ::QUrl* a1 = &a1def;
        const  ::QXmlSchemaValidator *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            sipName_documentUri,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BJ1|J9", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, sipType_QByteArray, &a0, &a0State, sipType_QUrl, &a1))
        {
            bool sipRes;

            sipRes = sipCpp->validate(*a0,*a1);
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_validate, doc_QXmlSchemaValidator_validate);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_namePool, "namePool(self) -> QXmlNamePool");

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

    {
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp))
        {
             ::QXmlNamePool*sipRes;

            sipRes = new  ::QXmlNamePool(sipCpp->namePool());

            return sipConvertFromNewType(sipRes,sipType_QXmlNamePool,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_namePool, doc_QXmlSchemaValidator_namePool);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_schema, "schema(self) -> QXmlSchema");

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

    {
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp))
        {
             ::QXmlSchema*sipRes = 0;

#line 40 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtXmlPatterns/qxmlschemavalidator.sip"
        // For reasons we don't quite understand QXmlSchema's copy ctor has to be
        // private as far as sip is concerned - otherwise we get compiler errors.
        // However that means that sip generates the wrong code here, because it
        // doesn't realise it can take a copy of the result.
        
        Py_BEGIN_ALLOW_THREADS
        sipRes = new QXmlSchema(sipCpp->schema());
        Py_END_ALLOW_THREADS
#line 215 "/build/pyqt5/src/PyQt5-5.15.7/build/QtXmlPatterns/sipQtXmlPatternsQXmlSchemaValidator.cpp"

            return sipConvertFromNewType(sipRes,sipType_QXmlSchema,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_schema, doc_QXmlSchemaValidator_schema);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_setMessageHandler, "setMessageHandler(self, QAbstractMessageHandler)");

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

    {
         ::QAbstractMessageHandler* a0;
        PyObject *a0Keep;
         ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, &a0Keep, sipType_QAbstractMessageHandler, &a0))
        {
            sipCpp->setMessageHandler(a0);

            sipKeepReference(sipSelf, -7, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_setMessageHandler, doc_QXmlSchemaValidator_setMessageHandler);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_messageHandler, "messageHandler(self) -> QAbstractMessageHandler");

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

    {
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp))
        {
             ::QAbstractMessageHandler*sipRes;

            sipRes = sipCpp->messageHandler();

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

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_messageHandler, doc_QXmlSchemaValidator_messageHandler);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_setUriResolver, "setUriResolver(self, QAbstractUriResolver)");

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

    {
        const  ::QAbstractUriResolver* a0;
        PyObject *a0Keep;
         ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, &a0Keep, sipType_QAbstractUriResolver, &a0))
        {
            sipCpp->setUriResolver(a0);

            sipKeepReference(sipSelf, -8, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_setUriResolver, doc_QXmlSchemaValidator_setUriResolver);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_uriResolver, "uriResolver(self) -> QAbstractUriResolver");

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

    {
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp))
        {
            const  ::QAbstractUriResolver*sipRes;

            sipRes = sipCpp->uriResolver();

            return sipConvertFromType(const_cast< ::QAbstractUriResolver *>(sipRes),sipType_QAbstractUriResolver,SIP_NULLPTR);
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_uriResolver, doc_QXmlSchemaValidator_uriResolver);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_setNetworkAccessManager, "setNetworkAccessManager(self, QNetworkAccessManager)");

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

    {
         ::QNetworkAccessManager* a0;
        PyObject *a0Keep;
         ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B@J8", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp, &a0Keep, sipType_QNetworkAccessManager, &a0))
        {
            sipCpp->setNetworkAccessManager(a0);

            sipKeepReference(sipSelf, -9, a0Keep);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_setNetworkAccessManager, doc_QXmlSchemaValidator_setNetworkAccessManager);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QXmlSchemaValidator_networkAccessManager, "networkAccessManager(self) -> QNetworkAccessManager");

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

    {
        const  ::QXmlSchemaValidator *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QXmlSchemaValidator, &sipCpp))
        {
             ::QNetworkAccessManager*sipRes;

            sipRes = sipCpp->networkAccessManager();

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

    sipNoMethod(sipParseErr, sipName_QXmlSchemaValidator, sipName_networkAccessManager, doc_QXmlSchemaValidator_networkAccessManager);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QXmlSchemaValidator(void *, int);}
static void release_QXmlSchemaValidator(void *sipCppV, int)
{
    delete reinterpret_cast< ::QXmlSchemaValidator *>(sipCppV);
}


extern "C" {static void *array_QXmlSchemaValidator(Py_ssize_t);}
static void *array_QXmlSchemaValidator(Py_ssize_t sipNrElem)
{
    return new  ::QXmlSchemaValidator[sipNrElem];
}


extern "C" {static void array_delete_QXmlSchemaValidator(void *);}
static void array_delete_QXmlSchemaValidator(void *sipCpp)
{
    delete[] reinterpret_cast< ::QXmlSchemaValidator *>(sipCpp);
}


extern "C" {static void dealloc_QXmlSchemaValidator(sipSimpleWrapper *);}
static void dealloc_QXmlSchemaValidator(sipSimpleWrapper *sipSelf)
{
    if (sipIsOwnedByPython(sipSelf))
    {
        release_QXmlSchemaValidator(sipGetAddress(sipSelf), 0);
    }
}


extern "C" {static void *init_type_QXmlSchemaValidator(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QXmlSchemaValidator(sipSimpleWrapper *, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **, PyObject **sipParseErr)
{
     ::QXmlSchemaValidator *sipCpp = SIP_NULLPTR;

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

            return sipCpp;
        }
    }

    {
        const  ::QXmlSchema* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QXmlSchemaValidator[] = {
    {sipName_messageHandler, meth_QXmlSchemaValidator_messageHandler, METH_VARARGS, doc_QXmlSchemaValidator_messageHandler},
    {sipName_namePool, meth_QXmlSchemaValidator_namePool, METH_VARARGS, doc_QXmlSchemaValidator_namePool},
    {sipName_networkAccessManager, meth_QXmlSchemaValidator_networkAccessManager, METH_VARARGS, doc_QXmlSchemaValidator_networkAccessManager},
    {sipName_schema, meth_QXmlSchemaValidator_schema, METH_VARARGS, doc_QXmlSchemaValidator_schema},
    {sipName_setMessageHandler, meth_QXmlSchemaValidator_setMessageHandler, METH_VARARGS, doc_QXmlSchemaValidator_setMessageHandler},
    {sipName_setNetworkAccessManager, meth_QXmlSchemaValidator_setNetworkAccessManager, METH_VARARGS, doc_QXmlSchemaValidator_setNetworkAccessManager},
    {sipName_setSchema, meth_QXmlSchemaValidator_setSchema, METH_VARARGS, doc_QXmlSchemaValidator_setSchema},
    {sipName_setUriResolver, meth_QXmlSchemaValidator_setUriResolver, METH_VARARGS, doc_QXmlSchemaValidator_setUriResolver},
    {sipName_uriResolver, meth_QXmlSchemaValidator_uriResolver, METH_VARARGS, doc_QXmlSchemaValidator_uriResolver},
    {sipName_validate, SIP_MLMETH_CAST(meth_QXmlSchemaValidator_validate), METH_VARARGS|METH_KEYWORDS, doc_QXmlSchemaValidator_validate}
};

PyDoc_STRVAR(doc_QXmlSchemaValidator, "\1QXmlSchemaValidator()\n"
"QXmlSchemaValidator(QXmlSchema)");


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


sipClassTypeDef sipTypeDef_QtXmlPatterns_QXmlSchemaValidator = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QXmlSchemaValidator,
        SIP_NULLPTR,
        &plugin_QXmlSchemaValidator
    },
    {
        sipNameNr_QXmlSchemaValidator,
        {0, 0, 1},
        10, methods_QXmlSchemaValidator,
        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_QXmlSchemaValidator,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QXmlSchemaValidator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QXmlSchemaValidator,
    SIP_NULLPTR,
    array_QXmlSchemaValidator,
    SIP_NULLPTR,
    release_QXmlSchemaValidator,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QXmlSchemaValidator,
    sizeof ( ::QXmlSchemaValidator),
};
