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

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNfc/qndeffilter.sip"
#include <qndeffilter.h>
#line 42 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNfc/qndeffilter.sip"
#include <qndeffilter.h>
#line 31 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilterRecord.cpp"

#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 35 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilterRecord.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNfc/qndefrecord.sip"
#include <qndefrecord.h>
#line 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilterRecord.cpp"


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


extern "C" {static void *array_QNdefFilter_Record(Py_ssize_t);}
static void *array_QNdefFilter_Record(Py_ssize_t sipNrElem)
{
    return new ::QNdefFilter::Record[sipNrElem];
}


extern "C" {static void array_delete_QNdefFilter_Record(void *);}
static void array_delete_QNdefFilter_Record(void *sipCpp)
{
    delete[] reinterpret_cast< ::QNdefFilter::Record *>(sipCpp);
}


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QNdefFilter::Record* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


extern "C" {static PyObject *varget_QNdefFilter_Record_maximum(void *, PyObject *, PyObject *);}
static PyObject *varget_QNdefFilter_Record_maximum(void *sipSelf, PyObject *, PyObject *)
{
    uint sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = sipCpp->maximum;

    return PyLong_FromUnsignedLong(sipVal);
}


extern "C" {static int varset_QNdefFilter_Record_maximum(void *, PyObject *, PyObject *);}
static int varset_QNdefFilter_Record_maximum(void *sipSelf, PyObject *sipPy, PyObject *)
{
    uint sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = sipLong_AsUnsignedInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->maximum = sipVal;

    return 0;
}


extern "C" {static PyObject *varget_QNdefFilter_Record_minimum(void *, PyObject *, PyObject *);}
static PyObject *varget_QNdefFilter_Record_minimum(void *sipSelf, PyObject *, PyObject *)
{
    uint sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = sipCpp->minimum;

    return PyLong_FromUnsignedLong(sipVal);
}


extern "C" {static int varset_QNdefFilter_Record_minimum(void *, PyObject *, PyObject *);}
static int varset_QNdefFilter_Record_minimum(void *sipSelf, PyObject *sipPy, PyObject *)
{
    uint sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = sipLong_AsUnsignedInt(sipPy);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->minimum = sipVal;

    return 0;
}


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

    sipPy = sipGetReference(sipPySelf, -1);

    if (sipPy)
        return sipPy;

    sipVal = &sipCpp->type;

    sipPy = sipConvertFromType(sipVal, sipType_QByteArray, SIP_NULLPTR);

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

    return sipPy;
}


extern "C" {static int varset_QNdefFilter_Record_type(void *, PyObject *, PyObject *);}
static int varset_QNdefFilter_Record_type(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QByteArray*sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(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->type = *sipVal;

    sipReleaseType(sipVal, sipType_QByteArray, sipValState);

    return 0;
}


extern "C" {static PyObject *varget_QNdefFilter_Record_typeNameFormat(void *, PyObject *, PyObject *);}
static PyObject *varget_QNdefFilter_Record_typeNameFormat(void *sipSelf, PyObject *, PyObject *)
{
    ::QNdefRecord::TypeNameFormat sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = sipCpp->typeNameFormat;

    return sipConvertFromEnum(static_cast<int>(sipVal), sipType_QNdefRecord_TypeNameFormat);
}


extern "C" {static int varset_QNdefFilter_Record_typeNameFormat(void *, PyObject *, PyObject *);}
static int varset_QNdefFilter_Record_typeNameFormat(void *sipSelf, PyObject *sipPy, PyObject *)
{
    ::QNdefRecord::TypeNameFormat sipVal;
    ::QNdefFilter::Record *sipCpp = reinterpret_cast< ::QNdefFilter::Record *>(sipSelf);

    sipVal = (::QNdefRecord::TypeNameFormat)sipConvertToEnum(sipPy, sipType_QNdefRecord_TypeNameFormat);

    if (PyErr_Occurred() != SIP_NULLPTR)
        return -1;

    sipCpp->typeNameFormat = sipVal;

    return 0;
}

sipVariableDef variables_QNdefFilter_Record[] = {
    {InstanceVariable, sipName_maximum, (PyMethodDef *)varget_QNdefFilter_Record_maximum, (PyMethodDef *)varset_QNdefFilter_Record_maximum, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_minimum, (PyMethodDef *)varget_QNdefFilter_Record_minimum, (PyMethodDef *)varset_QNdefFilter_Record_minimum, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_type, (PyMethodDef *)varget_QNdefFilter_Record_type, (PyMethodDef *)varset_QNdefFilter_Record_type, SIP_NULLPTR, SIP_NULLPTR},
    {InstanceVariable, sipName_typeNameFormat, (PyMethodDef *)varget_QNdefFilter_Record_typeNameFormat, (PyMethodDef *)varset_QNdefFilter_Record_typeNameFormat, SIP_NULLPTR, SIP_NULLPTR},
};

PyDoc_STRVAR(doc_QNdefFilter_Record, "\1QNdefFilter.Record()\n"
"QNdefFilter.Record(a0: QNdefFilter.Record)");


sipClassTypeDef sipTypeDef_QtNfc_QNdefFilter_Record = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QNdefFilter__Record,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_Record,
        {5, 255, 0},
        0, SIP_NULLPTR,
        4, variables_QNdefFilter_Record,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QNdefFilter_Record,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QNdefFilter_Record,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QNdefFilter_Record,
    assign_QNdefFilter_Record,
    array_QNdefFilter_Record,
    copy_QNdefFilter_Record,
    release_QNdefFilter_Record,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QNdefFilter_Record,
    sizeof (::QNdefFilter::Record),
};
