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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWebKitWidgets/qwebpage.sip"
#include <qwebpage.h>
#line 349 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWebKitWidgets/qwebpage.sip"
#include <qwebpage.h>
#line 31 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKitWidgets/sipQtWebKitWidgetsQWebPageErrorPageExtensionReturn.cpp"

#line 109 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 35 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKitWidgets/sipQtWebKitWidgetsQWebPageErrorPageExtensionReturn.cpp"
#line 30 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 38 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKitWidgets/sipQtWebKitWidgetsQWebPageErrorPageExtensionReturn.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 41 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKitWidgets/sipQtWebKitWidgetsQWebPageErrorPageExtensionReturn.cpp"


/* Cast a pointer to a type somewhere in its inheritance hierarchy. */
extern "C" {static void *cast_QWebPage_ErrorPageExtensionReturn(void *, const sipTypeDef *);}
static void *cast_QWebPage_ErrorPageExtensionReturn(void *sipCppV, const sipTypeDef *targetType)
{
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipCppV);

    if (targetType == sipType_QWebPage_ErrorPageExtensionReturn)
        return sipCppV;

    if (targetType == sipType_QWebPage_ExtensionReturn)
        return static_cast< ::QWebPage::ExtensionReturn *>(sipCpp);

    return SIP_NULLPTR;
}


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


extern "C" {static void *array_QWebPage_ErrorPageExtensionReturn(Py_ssize_t);}
static void *array_QWebPage_ErrorPageExtensionReturn(Py_ssize_t sipNrElem)
{
    return new  ::QWebPage::ErrorPageExtensionReturn[sipNrElem];
}


extern "C" {static void array_delete_QWebPage_ErrorPageExtensionReturn(void *);}
static void array_delete_QWebPage_ErrorPageExtensionReturn(void *sipCpp)
{
    delete[] reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QWebPage::ErrorPageExtensionReturn* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QWebPage_ErrorPageExtensionReturn[] = {{17, 255, 1}};


extern "C" {static PyObject *varget_QWebPage_ErrorPageExtensionReturn_baseUrl(void *, PyObject *, PyObject *);}
static PyObject *varget_QWebPage_ErrorPageExtensionReturn_baseUrl(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QUrl*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -7);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->baseUrl;

    sipPy = sipConvertFromType(sipVal, sipType_QUrl, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -14, sipPySelf);
        sipKeepReference(sipPySelf, -7, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QWebPage_ErrorPageExtensionReturn_baseUrl(void *, PyObject *, PyObject *);}
static int varset_QWebPage_ErrorPageExtensionReturn_baseUrl(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QUrl*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    int sipIsErr = 0;
    sipVal = reinterpret_cast< ::QUrl *>(sipForceConvertToType(sipPy, sipType_QUrl, SIP_NULLPTR, SIP_NOT_NONE, SIP_NULLPTR, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->baseUrl = *sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QWebPage_ErrorPageExtensionReturn_content(void *, PyObject *, PyObject *);}
static PyObject *varget_QWebPage_ErrorPageExtensionReturn_content(void *sipSelf, PyObject *sipPySelf, PyObject *)
{
    PyObject *sipPy;
     ::QByteArray*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    sipPy = sipGetReference(sipPySelf, -8);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->content;

    sipPy = sipConvertFromType(sipVal, sipType_QByteArray, SIP_NULLPTR);

    if (sipPy)
    {
        sipKeepReference(sipPy, -15, sipPySelf);
        sipKeepReference(sipPySelf, -8, sipPy);
    }

    return sipPy;
}


extern "C" {static int varset_QWebPage_ErrorPageExtensionReturn_content(void *, PyObject *, PyObject *);}
static int varset_QWebPage_ErrorPageExtensionReturn_content(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QByteArray*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QByteArray *>(sipForceConvertToType(sipPy, sipType_QByteArray, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->content = *sipVal;

    sipReleaseType(sipVal, sipType_QByteArray, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QWebPage_ErrorPageExtensionReturn_contentType(void *, PyObject *, PyObject *);}
static PyObject *varget_QWebPage_ErrorPageExtensionReturn_contentType(void *sipSelf, PyObject *, PyObject *)
{
     ::QString*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    sipVal = &sipCpp->contentType;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QWebPage_ErrorPageExtensionReturn_contentType(void *, PyObject *, PyObject *);}
static int varset_QWebPage_ErrorPageExtensionReturn_contentType(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QString *>(sipForceConvertToType(sipPy, sipType_QString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->contentType = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QWebPage_ErrorPageExtensionReturn_encoding(void *, PyObject *, PyObject *);}
static PyObject *varget_QWebPage_ErrorPageExtensionReturn_encoding(void *sipSelf, PyObject *, PyObject *)
{
     ::QString*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    sipVal = &sipCpp->encoding;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QWebPage_ErrorPageExtensionReturn_encoding(void *, PyObject *, PyObject *);}
static int varset_QWebPage_ErrorPageExtensionReturn_encoding(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QWebPage::ErrorPageExtensionReturn *sipCpp = reinterpret_cast< ::QWebPage::ErrorPageExtensionReturn *>(sipSelf);

    int sipIsErr = 0;
    int sipValState;
    sipVal = reinterpret_cast< ::QString *>(sipForceConvertToType(sipPy, sipType_QString, SIP_NULLPTR, SIP_NOT_NONE, &sipValState, &sipIsErr));

    if (sipIsErr)
        return -1;

    sipCpp->encoding = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}

sipVariableDef variables_QWebPage_ErrorPageExtensionReturn[] = {
    {InstanceVariable, sipName_baseUrl, (PyMethodDef *)varget_QWebPage_ErrorPageExtensionReturn_baseUrl, (PyMethodDef *)varset_QWebPage_ErrorPageExtensionReturn_baseUrl, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_content, (PyMethodDef *)varget_QWebPage_ErrorPageExtensionReturn_content, (PyMethodDef *)varset_QWebPage_ErrorPageExtensionReturn_content, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_contentType, (PyMethodDef *)varget_QWebPage_ErrorPageExtensionReturn_contentType, (PyMethodDef *)varset_QWebPage_ErrorPageExtensionReturn_contentType, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_encoding, (PyMethodDef *)varget_QWebPage_ErrorPageExtensionReturn_encoding, (PyMethodDef *)varset_QWebPage_ErrorPageExtensionReturn_encoding, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QWebPage_ErrorPageExtensionReturn, "\1QWebPage.ErrorPageExtensionReturn()\n"
"QWebPage.ErrorPageExtensionReturn(QWebPage.ErrorPageExtensionReturn)");


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


sipClassTypeDef sipTypeDef_QtWebKitWidgets_QWebPage_ErrorPageExtensionReturn = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebPage__ErrorPageExtensionReturn,
        SIP_NULLPTR,
        &plugin_QWebPage_ErrorPageExtensionReturn
    },
    {
        sipNameNr_ErrorPageExtensionReturn,
        {9, 255, 0},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        4, variables_QWebPage_ErrorPageExtensionReturn,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QWebPage_ErrorPageExtensionReturn,
    -1,
    -1,
    supers_QWebPage_ErrorPageExtensionReturn,
    SIP_NULLPTR,
    init_type_QWebPage_ErrorPageExtensionReturn,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebPage_ErrorPageExtensionReturn,
    assign_QWebPage_ErrorPageExtensionReturn,
    array_QWebPage_ErrorPageExtensionReturn,
    copy_QWebPage_ErrorPageExtensionReturn,
    release_QWebPage_ErrorPageExtensionReturn,
    cast_QWebPage_ErrorPageExtensionReturn,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QWebPage_ErrorPageExtensionReturn,
    sizeof ( ::QWebPage::ErrorPageExtensionReturn),
};
