/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtWebEngine.
 * 
 * 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 28 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/sip/QtWebEngineCore/qwebengineurlrequestinfo.sip"
#include <qwebengineurlrequestinfo.h>
#line 29 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineUrlRequestInfo.cpp"

#line 109 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qurl.sip"
#include <qurl.h>
#line 33 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineUrlRequestInfo.cpp"
#line 30 "/usr/lib/python3.10/site-packages/PyQt5/bindings/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 36 "/build/pyqt5-webengine/src/PyQtWebEngine-5.15.6/build/QtWebEngineCore/sipQtWebEngineCoreQWebEngineUrlRequestInfo.cpp"


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_resourceType, "resourceType(self) -> QWebEngineUrlRequestInfo.ResourceType");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineUrlRequestInfo, &sipCpp))
        {
             ::QWebEngineUrlRequestInfo::ResourceType sipRes;

            sipRes = sipCpp->resourceType();

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_resourceType, doc_QWebEngineUrlRequestInfo_resourceType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_navigationType, "navigationType(self) -> QWebEngineUrlRequestInfo.NavigationType");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QWebEngineUrlRequestInfo, &sipCpp))
        {
             ::QWebEngineUrlRequestInfo::NavigationType sipRes;

            sipRes = sipCpp->navigationType();

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_navigationType, doc_QWebEngineUrlRequestInfo_navigationType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_requestUrl, "requestUrl(self) -> QUrl");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_requestUrl, doc_QWebEngineUrlRequestInfo_requestUrl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_firstPartyUrl, "firstPartyUrl(self) -> QUrl");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_firstPartyUrl, doc_QWebEngineUrlRequestInfo_firstPartyUrl);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_requestMethod, "requestMethod(self) -> QByteArray");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

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

            sipRes = new  ::QByteArray(sipCpp->requestMethod());

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_requestMethod, doc_QWebEngineUrlRequestInfo_requestMethod);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_block, "block(self, bool)");

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

    {
        bool a0;
         ::QWebEngineUrlRequestInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QWebEngineUrlRequestInfo, &sipCpp, &a0))
        {
            sipCpp->block(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_block, doc_QWebEngineUrlRequestInfo_block);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_redirect, "redirect(self, QUrl)");

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

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

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QWebEngineUrlRequestInfo, &sipCpp, sipType_QUrl, &a0))
        {
            sipCpp->redirect(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_redirect, doc_QWebEngineUrlRequestInfo_redirect);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_setHttpHeader, "setHttpHeader(self, Union[QByteArray, bytes, bytearray], Union[QByteArray, bytes, bytearray])");

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

    {
        const  ::QByteArray* a0;
        int a0State = 0;
        const  ::QByteArray* a1;
        int a1State = 0;
         ::QWebEngineUrlRequestInfo *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1J1", &sipSelf, sipType_QWebEngineUrlRequestInfo, &sipCpp, sipType_QByteArray, &a0, &a0State, sipType_QByteArray, &a1, &a1State))
        {
            sipCpp->setHttpHeader(*a0,*a1);
            sipReleaseType(const_cast< ::QByteArray *>(a0), sipType_QByteArray, a0State);
            sipReleaseType(const_cast< ::QByteArray *>(a1), sipType_QByteArray, a1State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_setHttpHeader, doc_QWebEngineUrlRequestInfo_setHttpHeader);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebEngineUrlRequestInfo_initiator, "initiator(self) -> QUrl");

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

    {
        const  ::QWebEngineUrlRequestInfo *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebEngineUrlRequestInfo, sipName_initiator, doc_QWebEngineUrlRequestInfo_initiator);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QWebEngineUrlRequestInfo(void *, int);}
static void release_QWebEngineUrlRequestInfo(void *, int)
{
}


static PyMethodDef methods_QWebEngineUrlRequestInfo[] = {
    {sipName_block, meth_QWebEngineUrlRequestInfo_block, METH_VARARGS, doc_QWebEngineUrlRequestInfo_block},
    {sipName_firstPartyUrl, meth_QWebEngineUrlRequestInfo_firstPartyUrl, METH_VARARGS, doc_QWebEngineUrlRequestInfo_firstPartyUrl},
    {sipName_initiator, meth_QWebEngineUrlRequestInfo_initiator, METH_VARARGS, doc_QWebEngineUrlRequestInfo_initiator},
    {sipName_navigationType, meth_QWebEngineUrlRequestInfo_navigationType, METH_VARARGS, doc_QWebEngineUrlRequestInfo_navigationType},
    {sipName_redirect, meth_QWebEngineUrlRequestInfo_redirect, METH_VARARGS, doc_QWebEngineUrlRequestInfo_redirect},
    {sipName_requestMethod, meth_QWebEngineUrlRequestInfo_requestMethod, METH_VARARGS, doc_QWebEngineUrlRequestInfo_requestMethod},
    {sipName_requestUrl, meth_QWebEngineUrlRequestInfo_requestUrl, METH_VARARGS, doc_QWebEngineUrlRequestInfo_requestUrl},
    {sipName_resourceType, meth_QWebEngineUrlRequestInfo_resourceType, METH_VARARGS, doc_QWebEngineUrlRequestInfo_resourceType},
    {sipName_setHttpHeader, meth_QWebEngineUrlRequestInfo_setHttpHeader, METH_VARARGS, doc_QWebEngineUrlRequestInfo_setHttpHeader}
};

static sipEnumMemberDef enummembers_QWebEngineUrlRequestInfo[] = {
    {sipName_NavigationTypeBackForward, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeBackForward), 14},
    {sipName_NavigationTypeFormSubmitted, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeFormSubmitted), 14},
    {sipName_NavigationTypeLink, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeLink), 14},
    {sipName_NavigationTypeOther, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeOther), 14},
    {sipName_NavigationTypeRedirect, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeRedirect), 14},
    {sipName_NavigationTypeReload, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeReload), 14},
    {sipName_NavigationTypeTyped, static_cast<int>( ::QWebEngineUrlRequestInfo::NavigationTypeTyped), 14},
    {sipName_ResourceTypeCspReport, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeCspReport), 15},
    {sipName_ResourceTypeFavicon, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeFavicon), 15},
    {sipName_ResourceTypeFontResource, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeFontResource), 15},
    {sipName_ResourceTypeImage, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeImage), 15},
    {sipName_ResourceTypeMainFrame, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeMainFrame), 15},
    {sipName_ResourceTypeMedia, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeMedia), 15},
    {sipName_ResourceTypeNavigationPreloadMainFrame, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadMainFrame), 15},
    {sipName_ResourceTypeNavigationPreloadSubFrame, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeNavigationPreloadSubFrame), 15},
    {sipName_ResourceTypeObject, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeObject), 15},
    {sipName_ResourceTypePing, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypePing), 15},
    {sipName_ResourceTypePluginResource, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypePluginResource), 15},
    {sipName_ResourceTypePrefetch, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypePrefetch), 15},
    {sipName_ResourceTypeScript, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeScript), 15},
    {sipName_ResourceTypeServiceWorker, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeServiceWorker), 15},
    {sipName_ResourceTypeSharedWorker, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeSharedWorker), 15},
    {sipName_ResourceTypeStylesheet, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeStylesheet), 15},
    {sipName_ResourceTypeSubFrame, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeSubFrame), 15},
    {sipName_ResourceTypeSubResource, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeSubResource), 15},
    {sipName_ResourceTypeUnknown, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeUnknown), 15},
    {sipName_ResourceTypeWorker, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeWorker), 15},
    {sipName_ResourceTypeXhr, static_cast<int>( ::QWebEngineUrlRequestInfo::ResourceTypeXhr), 15},
};


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


sipClassTypeDef sipTypeDef_QtWebEngineCore_QWebEngineUrlRequestInfo = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebEngineUrlRequestInfo,
        SIP_NULLPTR,
        &plugin_QWebEngineUrlRequestInfo
    },
    {
        sipNameNr_QWebEngineUrlRequestInfo,
        {0, 0, 1},
        9, methods_QWebEngineUrlRequestInfo,
        28, enummembers_QWebEngineUrlRequestInfo,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    SIP_NULLPTR,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QWebEngineUrlRequestInfo,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
