/*
 * 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 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"

#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNfc/qndefmessage.sip"
#include <qndefmessage.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"
#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 38 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"
#line 28 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtNfc/qndefrecord.sip"
#include <qndefrecord.h>
#line 41 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"
#line 30 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 44 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"


PyDoc_STRVAR(doc_QNdefFilter_clear, "clear(self)");

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

    {
        ::QNdefFilter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QNdefFilter, &sipCpp))
        {
            sipCpp->clear();

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_clear, doc_QNdefFilter_clear);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_setOrderMatch, "setOrderMatch(self, on: bool)");

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

    {
        bool a0;
        ::QNdefFilter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bb", &sipSelf, sipType_QNdefFilter, &sipCpp, &a0))
        {
            sipCpp->setOrderMatch(a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_setOrderMatch, doc_QNdefFilter_setOrderMatch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_orderMatch, "orderMatch(self) -> bool");

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

    {
        const ::QNdefFilter *sipCpp;

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

            sipRes = sipCpp->orderMatch();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_orderMatch, doc_QNdefFilter_orderMatch);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_appendRecord, "appendRecord(self, record: QNdefFilter.Record) -> bool\n"
"appendRecord(self, typeNameFormat: QNdefRecord.TypeNameFormat, type: QByteArray|bytes|bytearray|memoryview, min: int = 1, max: int = 1) -> bool");

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

    {
        const ::QNdefFilter::Record* a0;
        ::QNdefFilter *sipCpp;

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, SIP_NULLPTR, "BJ9", &sipSelf, sipType_QNdefFilter, &sipCpp, sipType_QNdefFilter_Record, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->appendRecord(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    {
        ::QNdefRecord::TypeNameFormat a0;
        const ::QByteArray* a1;
        int a1State = 0;
        uint a2 = 1;
        uint a3 = 1;
        ::QNdefFilter *sipCpp;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_min,
            sipName_max,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "BEJ1|uu", &sipSelf, sipType_QNdefFilter, &sipCpp, sipType_QNdefRecord_TypeNameFormat, &a0, sipType_QByteArray, &a1, &a1State, &a2, &a3))
        {
            bool sipRes;

            sipRes = sipCpp->appendRecord(a0, *a1, a2, a3);
            sipReleaseType(const_cast< ::QByteArray *>(a1), sipType_QByteArray, a1State);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_appendRecord, doc_QNdefFilter_appendRecord);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_recordCount, "recordCount(self) -> int");

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

    {
        const ::QNdefFilter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QNdefFilter, &sipCpp))
        {
            ::qsizetype sipRes;

            sipRes = sipCpp->recordCount();

            return PyLong_FromLongLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_recordCount, doc_QNdefFilter_recordCount);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_recordAt, "recordAt(self, i: int) -> QNdefFilter.Record");

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

    {
        ::qsizetype a0;
        const ::QNdefFilter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bn", &sipSelf, sipType_QNdefFilter, &sipCpp, &a0))
        {
            ::QNdefFilter::Record*sipRes;

            sipRes = new ::QNdefFilter::Record(sipCpp->recordAt(a0));

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

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_recordAt, doc_QNdefFilter_recordAt);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QNdefFilter_match, "match(self, message: QNdefMessage) -> bool");

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

    {
        const ::QNdefMessage* a0;
        const ::QNdefFilter *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QNdefFilter, &sipCpp, sipType_QNdefMessage, &a0))
        {
            bool sipRes;

            sipRes = sipCpp->match(*a0);

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QNdefFilter, sipName_match, doc_QNdefFilter_match);

    return SIP_NULLPTR;
}


extern "C" {static Py_ssize_t slot_QNdefFilter___len__(PyObject *);}
static Py_ssize_t slot_QNdefFilter___len__(PyObject *sipSelf)
{
    ::QNdefFilter *sipCpp = reinterpret_cast< ::QNdefFilter *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QNdefFilter));

    if (!sipCpp)
        return 0;


    {
        {
            Py_ssize_t sipRes = 0;

#line 1 "Auto-generated"
            sipRes = (Py_ssize_t)sipCpp->recordCount();
#line 273 "/build/pyqt6/src/pyqt6-6.11.0/build/QtNfc/sipQtNfcQNdefFilter.cpp"

            return sipRes;
        }
    }

    return 0;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QNdefFilter* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QNdefFilter[] = {
    {(void *)slot_QNdefFilter___len__, len_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QNdefFilter[] = {
    {sipName_appendRecord, SIP_MLMETH_CAST(meth_QNdefFilter_appendRecord), METH_VARARGS|METH_KEYWORDS, doc_QNdefFilter_appendRecord},
    {sipName_clear, meth_QNdefFilter_clear, METH_VARARGS, doc_QNdefFilter_clear},
    {sipName_match, meth_QNdefFilter_match, METH_VARARGS, doc_QNdefFilter_match},
    {sipName_orderMatch, meth_QNdefFilter_orderMatch, METH_VARARGS, doc_QNdefFilter_orderMatch},
    {sipName_recordAt, meth_QNdefFilter_recordAt, METH_VARARGS, doc_QNdefFilter_recordAt},
    {sipName_recordCount, meth_QNdefFilter_recordCount, METH_VARARGS, doc_QNdefFilter_recordCount},
    {sipName_setOrderMatch, meth_QNdefFilter_setOrderMatch, METH_VARARGS, doc_QNdefFilter_setOrderMatch}
};

PyDoc_STRVAR(doc_QNdefFilter, "\1QNdefFilter()\n"
"QNdefFilter(other: QNdefFilter)");


sipClassTypeDef sipTypeDef_QtNfc_QNdefFilter = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QNdefFilter,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QNdefFilter,
        {0, 0, 1},
        7, methods_QNdefFilter,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QNdefFilter,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QNdefFilter,
    init_type_QNdefFilter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QNdefFilter,
    assign_QNdefFilter,
    array_QNdefFilter,
    copy_QNdefFilter,
    release_QNdefFilter,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QNdefFilter,
    sizeof (::QNdefFilter),
};
