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

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtWebKit/qwebhistory.sip"
#include <qwebhistory.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtGui/qicon.sip"
#include <qicon.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"
#line 360 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qdatetime.sip"
#include <qdatetime.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"
#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"
#line 109 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 45 "/build/pyqt5/src/PyQt5-5.15.7/build/QtWebKit/sipQtWebKitQWebHistoryItem.cpp"


PyDoc_STRVAR(doc_QWebHistoryItem_originalUrl, "originalUrl(self) -> QUrl");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_originalUrl, doc_QWebHistoryItem_originalUrl);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_url, doc_QWebHistoryItem_url);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_title, "title(self) -> str");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_title, doc_QWebHistoryItem_title);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_lastVisited, "lastVisited(self) -> QDateTime");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

            sipRes = new  ::QDateTime(sipCpp->lastVisited());

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_lastVisited, doc_QWebHistoryItem_lastVisited);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_icon, "icon(self) -> QIcon");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

            sipRes = new  ::QIcon(sipCpp->icon());

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_icon, doc_QWebHistoryItem_icon);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_userData, "userData(self) -> Any");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

            sipRes = new  ::QVariant(sipCpp->userData());

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

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_userData, doc_QWebHistoryItem_userData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_setUserData, "setUserData(self, Any)");

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

    {
        const  ::QVariant* a0;
        int a0State = 0;
         ::QWebHistoryItem *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QWebHistoryItem, &sipCpp, sipType_QVariant, &a0, &a0State))
        {
            sipCpp->setUserData(*a0);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_setUserData, doc_QWebHistoryItem_setUserData);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QWebHistoryItem_isValid, "isValid(self) -> bool");

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

    {
        const  ::QWebHistoryItem *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QWebHistoryItem, sipName_isValid, doc_QWebHistoryItem_isValid);

    return SIP_NULLPTR;
}


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


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


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


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


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

    {
        const  ::QWebHistoryItem* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QWebHistoryItem[] = {
    {sipName_icon, meth_QWebHistoryItem_icon, METH_VARARGS, doc_QWebHistoryItem_icon},
    {sipName_isValid, meth_QWebHistoryItem_isValid, METH_VARARGS, doc_QWebHistoryItem_isValid},
    {sipName_lastVisited, meth_QWebHistoryItem_lastVisited, METH_VARARGS, doc_QWebHistoryItem_lastVisited},
    {sipName_originalUrl, meth_QWebHistoryItem_originalUrl, METH_VARARGS, doc_QWebHistoryItem_originalUrl},
    {sipName_setUserData, meth_QWebHistoryItem_setUserData, METH_VARARGS, doc_QWebHistoryItem_setUserData},
    {sipName_title, meth_QWebHistoryItem_title, METH_VARARGS, doc_QWebHistoryItem_title},
    {sipName_url, meth_QWebHistoryItem_url, METH_VARARGS, doc_QWebHistoryItem_url},
    {sipName_userData, meth_QWebHistoryItem_userData, METH_VARARGS, doc_QWebHistoryItem_userData}
};

PyDoc_STRVAR(doc_QWebHistoryItem, "\1QWebHistoryItem(QWebHistoryItem)");


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


sipClassTypeDef sipTypeDef_QtWebKit_QWebHistoryItem = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QWebHistoryItem,
        SIP_NULLPTR,
        &plugin_QWebHistoryItem
    },
    {
        sipNameNr_QWebHistoryItem,
        {0, 0, 1},
        8, methods_QWebHistoryItem,
        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_QWebHistoryItem,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QWebHistoryItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QWebHistoryItem,
    assign_QWebHistoryItem,
    SIP_NULLPTR,
    copy_QWebHistoryItem,
    release_QWebHistoryItem,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QWebHistoryItem),
};
