/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.7.0
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQt6-WebEngine.
 * 
 * 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 "sipAPIQtWebEngineCore.h"

#line 26 "/build/pyqt6-webengine/src/PyQt6_WebEngine-6.4.0/sip/QtWebEngineCore/qwebengineloadinginfo.sip"
#include <qwebengineloadinginfo.h>
#line 29 "/build/pyqt6-webengine/src/PyQt6_WebEngine-6.4.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineLoadingInfo.cpp"

#line 26 "/usr/lib/python3.10/site-packages/PyQt6/bindings/QtCore/qurl.sip"
#include <qurl.h>
#line 33 "/build/pyqt6-webengine/src/PyQt6_WebEngine-6.4.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineLoadingInfo.cpp"
#line 24 "/usr/lib/python3.10/site-packages/PyQt6/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 36 "/build/pyqt6-webengine/src/PyQt6_WebEngine-6.4.0/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineLoadingInfo.cpp"


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_url, "url(self) -> QUrl");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

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

            sipRes = new  ::QUrl(sipCpp->url());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_url, doc_QWebEngineLoadingInfo_url);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_isErrorPage, "isErrorPage(self) -> bool");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineLoadingInfo, &sipCpp))
        {
            bool sipRes;

            sipRes = sipCpp->isErrorPage();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_isErrorPage, doc_QWebEngineLoadingInfo_isErrorPage);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_status, "status(self) -> QWebEngineLoadingInfo.LoadStatus");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineLoadingInfo, &sipCpp))
        {
             ::QWebEngineLoadingInfo::LoadStatus sipRes;

            sipRes = sipCpp->status();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QWebEngineLoadingInfo_LoadStatus);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_status, doc_QWebEngineLoadingInfo_status);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_errorString, "errorString(self) -> str");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

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

            sipRes = new  ::QString(sipCpp->errorString());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_errorString, doc_QWebEngineLoadingInfo_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_errorDomain, "errorDomain(self) -> QWebEngineLoadingInfo.ErrorDomain");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineLoadingInfo, &sipCpp))
        {
             ::QWebEngineLoadingInfo::ErrorDomain sipRes;

            sipRes = sipCpp->errorDomain();

            return sipConvertFromEnum(static_cast<int>(sipRes), sipType_QWebEngineLoadingInfo_ErrorDomain);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_errorDomain, doc_QWebEngineLoadingInfo_errorDomain);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineLoadingInfo_errorCode, "errorCode(self) -> int");

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

    {
        const  ::QWebEngineLoadingInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineLoadingInfo, &sipCpp))
        {
            int sipRes;

            sipRes = sipCpp->errorCode();

            return PyLong_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineLoadingInfo, sipName_errorCode, doc_QWebEngineLoadingInfo_errorCode);

    return SIP_NULLPTR;
}


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


extern "C" {static void assign_QWebEngineLoadingInfo(void *, Py_ssize_t, void *);}
static void assign_QWebEngineLoadingInfo(void *sipDst, Py_ssize_t sipDstIdx, void *sipSrc)
{
    reinterpret_cast< ::QWebEngineLoadingInfo *>(sipDst)[sipDstIdx] = *reinterpret_cast< ::QWebEngineLoadingInfo *>(sipSrc);
}


extern "C" {static void *copy_QWebEngineLoadingInfo(const void *, Py_ssize_t);}
static void *copy_QWebEngineLoadingInfo(const void *sipSrc, Py_ssize_t sipSrcIdx)
{
    return new  ::QWebEngineLoadingInfo(reinterpret_cast<const  ::QWebEngineLoadingInfo *>(sipSrc)[sipSrcIdx]);
}


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


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

    {
        const  ::QWebEngineLoadingInfo* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QWebEngineLoadingInfo[] = {
    {sipName_errorCode, meth_QWebEngineLoadingInfo_errorCode, METH_VARARGS, doc_QWebEngineLoadingInfo_errorCode},
    {sipName_errorDomain, meth_QWebEngineLoadingInfo_errorDomain, METH_VARARGS, doc_QWebEngineLoadingInfo_errorDomain},
    {sipName_errorString, meth_QWebEngineLoadingInfo_errorString, METH_VARARGS, doc_QWebEngineLoadingInfo_errorString},
    {sipName_isErrorPage, meth_QWebEngineLoadingInfo_isErrorPage, METH_VARARGS, doc_QWebEngineLoadingInfo_isErrorPage},
    {sipName_status, meth_QWebEngineLoadingInfo_status, METH_VARARGS, doc_QWebEngineLoadingInfo_status},
    {sipName_url, meth_QWebEngineLoadingInfo_url, METH_VARARGS, doc_QWebEngineLoadingInfo_url}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QWebEngineLoadingInfo[] = {
    {sipName_NoErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::NoErrorDomain)},
    {sipName_InternalErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::InternalErrorDomain)},
    {sipName_ConnectionErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::ConnectionErrorDomain)},
    {sipName_CertificateErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::CertificateErrorDomain)},
    {sipName_HttpErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::HttpErrorDomain)},
    {sipName_FtpErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::FtpErrorDomain)},
    {sipName_DnsErrorDomain, static_cast<int>( ::QWebEngineLoadingInfo::DnsErrorDomain)},
    {sipName_HttpStatusCodeDomain, static_cast<int>( ::QWebEngineLoadingInfo::HttpStatusCodeDomain)},
    {sipName_LoadStartedStatus, static_cast<int>( ::QWebEngineLoadingInfo::LoadStartedStatus)},
    {sipName_LoadStoppedStatus, static_cast<int>( ::QWebEngineLoadingInfo::LoadStoppedStatus)},
    {sipName_LoadSucceededStatus, static_cast<int>( ::QWebEngineLoadingInfo::LoadSucceededStatus)},
    {sipName_LoadFailedStatus, static_cast<int>( ::QWebEngineLoadingInfo::LoadFailedStatus)},
    {0, 0}
};

PyDoc_STRVAR(doc_QWebEngineLoadingInfo, "\1QWebEngineLoadingInfo(QWebEngineLoadingInfo)");


sipClassTypeDef sipTypeDef_QtWebEngineCore_QWebEngineLoadingInfo = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEngineLoadingInfo,
        SIP_NULLPTR,
        SIP_NULLPTR
    },
    {
        sipNameNr_QWebEngineLoadingInfo,
        {0, 0, 1},
        6, methods_QWebEngineLoadingInfo,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QWebEngineLoadingInfo, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebEngineLoadingInfo,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QWebEngineLoadingInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebEngineLoadingInfo,
    assign_QWebEngineLoadingInfo,
    SIP_NULLPTR,
    copy_QWebEngineLoadingInfo,
    release_QWebEngineLoadingInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QWebEngineLoadingInfo),
};
