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

#line 41 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcborcommon.sip"
#include <qcborcommon.h>
#line 29 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCborError.cpp"

#line 24 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCborError.cpp"


PyDoc_STRVAR(doc_QCborError_code, "code(self) -> QCborError.Code");

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

    {
        const ::QCborError *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QCborError, &sipCpp))
        {
            ::QCborError::Code sipRes = ::QCborError::UnknownError;

#line 69 "/build/pyqt6/src/pyqt6-6.11.0/sip/QtCore/qcborcommon.sip"
    sipRes = sipCpp->c;
#line 52 "/build/pyqt6/src/pyqt6-6.11.0/build/QtCore/sipQtCoreQCborError.cpp"

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

    sipNoMethod(sipParseErr, sipName_QCborError, sipName_code, doc_QCborError_code);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QCborError_toString, "toString(self) -> str");

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

    {
        const ::QCborError *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QCborError, sipName_toString, doc_QCborError_toString);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QCborError* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QCborError[] = {
    {sipName_code, meth_QCborError_code, METH_VARARGS, doc_QCborError_code},
    {sipName_toString, meth_QCborError_toString, METH_VARARGS, doc_QCborError_toString}
};


/* Define the enum members and ints to be added to this type. */
static sipIntInstanceDef intInstances_QCborError[] = {
    {sipName_UnknownError, static_cast<int>(::QCborError::UnknownError)},
    {sipName_AdvancePastEnd, static_cast<int>(::QCborError::AdvancePastEnd)},
    {sipName_InputOutputError, static_cast<int>(::QCborError::InputOutputError)},
    {sipName_GarbageAtEnd, static_cast<int>(::QCborError::GarbageAtEnd)},
    {sipName_EndOfFile, static_cast<int>(::QCborError::EndOfFile)},
    {sipName_UnexpectedBreak, static_cast<int>(::QCborError::UnexpectedBreak)},
    {sipName_UnknownType, static_cast<int>(::QCborError::UnknownType)},
    {sipName_IllegalType, static_cast<int>(::QCborError::IllegalType)},
    {sipName_IllegalNumber, static_cast<int>(::QCborError::IllegalNumber)},
    {sipName_IllegalSimpleType, static_cast<int>(::QCborError::IllegalSimpleType)},
    {sipName_InvalidUtf8String, static_cast<int>(::QCborError::InvalidUtf8String)},
    {sipName_DataTooLarge, static_cast<int>(::QCborError::DataTooLarge)},
    {sipName_NestingTooDeep, static_cast<int>(::QCborError::NestingTooDeep)},
    {sipName_UnsupportedType, static_cast<int>(::QCborError::UnsupportedType)},
    {sipName_NoError, static_cast<int>(::QCborError::NoError)},
    {0, 0}
};

PyDoc_STRVAR(doc_QCborError, "\1QCborError()\n"
"QCborError(a0: QCborError)");


sipClassTypeDef sipTypeDef_QtCore_QCborError = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QCborError,
        SIP_NULLPTR,
        SIP_NULLPTR,
    },
    {
        sipNameNr_QCborError,
        {0, 0, 1},
        2, methods_QCborError,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, intInstances_QCborError, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QCborError,
    -1,
    sipNameNr_PyQt6_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QCborError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QCborError,
    assign_QCborError,
    array_QCborError,
    copy_QCborError,
    release_QCborError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QCborError,
    sizeof (::QCborError),
};
