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

#line 28 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtHelp/qhelplink.sip"
#include <qhelplink.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtHelp/sipQtHelpQHelpLink.cpp"

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtHelp/sipQtHelpQHelpLink.cpp"
#line 109 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qurl.sip"
#include <qurl.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtHelp/sipQtHelpQHelpLink.cpp"


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QHelpLink* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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

    sipVal = &sipCpp->title;

    return sipConvertFromType(sipVal, sipType_QString, SIP_NULLPTR);
}


extern "C" {static int varset_QHelpLink_title(void *, PyObject *, PyObject *);}
static int varset_QHelpLink_title(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QString*sipVal;
     ::QHelpLink *sipCpp = reinterpret_cast< ::QHelpLink *>(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->title = *sipVal;

    sipReleaseType(sipVal, sipType_QString, sipValState);

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -1);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->url;

    sipPy = sipConvertFromType(sipVal, sipType_QUrl, SIP_NULLPTR);

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

    return sipPy;
}


extern "C" {static int varset_QHelpLink_url(void *, PyObject *, PyObject *);}
static int varset_QHelpLink_url(void *sipSelf, PyObject *sipPy, PyObject *)
{
     ::QUrl*sipVal;
     ::QHelpLink *sipCpp = reinterpret_cast< ::QHelpLink *>(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->url = *sipVal;

    return 0;
}

sipVariableDef variables_QHelpLink[] = {
    {InstanceVariable, sipName_title, (PyMethodDef *)varget_QHelpLink_title, (PyMethodDef *)varset_QHelpLink_title, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_url, (PyMethodDef *)varget_QHelpLink_url, (PyMethodDef *)varset_QHelpLink_url, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QHelpLink, "\1QHelpLink()\n"
"QHelpLink(QHelpLink)");


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


sipClassTypeDef sipTypeDef_QtHelp_QHelpLink = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QHelpLink,
        SIP_NULLPTR,
        &plugin_QHelpLink
    },
    {
        sipNameNr_QHelpLink,
        {0, 0, 1},
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        2, variables_QHelpLink,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QHelpLink,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QHelpLink,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QHelpLink,
    assign_QHelpLink,
    array_QHelpLink,
    copy_QHelpLink,
    release_QHelpLink,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QHelpLink,
    sizeof ( ::QHelpLink),
};
