/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.15.3
 *
 * Copyright (c) 2024 Riverbank Computing Limited <info@riverbankcomputing.com>
 * 
 * This file is part of PyQtPurchasing.
 * 
 * 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 "sipAPIQtPurchasing.h"

#line 26 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/sip/QtPurchasing/qinappproduct.sip"
#include <qinappproduct.h>
#line 29 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"

#line 27 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 146 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 38 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 41 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 44 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 252 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 47 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 240 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 50 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 28 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobject.sip"
#include <qobject.h>
#line 53 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qvariant.sip"
#include <qvariant.h>
#line 56 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 38 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 59 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 30 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 62 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 149 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 65 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 68 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qthread.sip"
#include <qthread.h>
#line 71 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 74 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qregexp.sip"
#include <qregexp.h>
#line 77 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 80 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"
#line 26 "/usr/lib/python3.14/site-packages/PyQt5/bindings/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 83 "/build/python-pyqt5-purchasing/src/PyQtPurchasing-5.15.6/build/QtPurchasing/sipQtPurchasingQInAppProduct.cpp"


PyDoc_STRVAR(doc_QInAppProduct_identifier, "identifier(self) -> str");

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

    {
        const ::QInAppProduct *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_identifier, doc_QInAppProduct_identifier);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppProduct_productType, "productType(self) -> QInAppProduct.ProductType");

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

    {
        const ::QInAppProduct *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppProduct, &sipCpp))
        {
            ::QInAppProduct::ProductType sipRes;

            sipRes = sipCpp->productType();

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

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_productType, doc_QInAppProduct_productType);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppProduct_price, "price(self) -> str");

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

    {
        const ::QInAppProduct *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_price, doc_QInAppProduct_price);

    return SIP_NULLPTR;
}


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

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

    {
        const ::QInAppProduct *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_title, doc_QInAppProduct_title);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppProduct_description, "description(self) -> str");

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

    {
        const ::QInAppProduct *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_description, doc_QInAppProduct_description);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QInAppProduct_purchase, "purchase(self)");

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

    {
        ::QInAppProduct *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QInAppProduct, &sipCpp))
        {
            if (!sipOrigSelf)
            {
                sipAbstractMethod(sipName_QInAppProduct, sipName_purchase);
                return SIP_NULLPTR;
            }

            sipCpp->purchase();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QInAppProduct, sipName_purchase, doc_QInAppProduct_purchase);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QInAppProduct)
        return sipCppV;

    if (targetType == sipType_QObject)
        return static_cast< ::QObject *>(sipCpp);

    return SIP_NULLPTR;
}


/* Call the instance's destructor. */
extern "C" {static void release_QInAppProduct(void *, int);}
static void release_QInAppProduct(void *sipCppV, int)
{
    ::QInAppProduct *sipCpp = reinterpret_cast< ::QInAppProduct *>(sipCppV);

    if (QThread::currentThread() == sipCpp->thread())
        delete sipCpp;
    else
        sipCpp->deleteLater();
}


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


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QInAppProduct[] = {{4, 0, 1}};


static PyMethodDef methods_QInAppProduct[] = {
    {sipName_description, meth_QInAppProduct_description, METH_VARARGS, doc_QInAppProduct_description},
    {sipName_identifier, meth_QInAppProduct_identifier, METH_VARARGS, doc_QInAppProduct_identifier},
    {sipName_price, meth_QInAppProduct_price, METH_VARARGS, doc_QInAppProduct_price},
    {sipName_productType, meth_QInAppProduct_productType, METH_VARARGS, doc_QInAppProduct_productType},
    {sipName_purchase, meth_QInAppProduct_purchase, METH_VARARGS, doc_QInAppProduct_purchase},
    {sipName_title, meth_QInAppProduct_title, METH_VARARGS, doc_QInAppProduct_title}
};

static sipEnumMemberDef enummembers_QInAppProduct[] = {
    {sipName_Consumable, static_cast<int>(::QInAppProduct::Consumable), 1},
    {sipName_Unlockable, static_cast<int>(::QInAppProduct::Unlockable), 1},
};


static pyqt5ClassPluginDef plugin_QInAppProduct = {
    &::QInAppProduct::staticMetaObject,
    0,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtPurchasing_QInAppProduct = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_ABSTRACT|SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QInAppProduct,
        SIP_NULLPTR,
        &plugin_QInAppProduct,
    },
    {
        sipNameNr_QInAppProduct,
        {0, 0, 1},
        6, methods_QInAppProduct,
        2, enummembers_QInAppProduct,
        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,
    -1,
    supers_QInAppProduct,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QInAppProduct,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QInAppProduct,
    cast_QInAppProduct,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    0,
};
