/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.14.0
 *
 * Copyright (c) 2024 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 "sipAPIQtDBus.h"

#line 76 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbusextratypes.sip"
#include <qdbusextratypes.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusVariant.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusVariant.cpp"


PyDoc_STRVAR(doc_QDBusVariant_variant, "variant(self) -> Any");

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

    {
        const ::QDBusVariant *sipCpp;

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

            sipRes = new ::QVariant(sipCpp->variant());

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

    sipNoMethod(sipParseErr, sipName_QDBusVariant, sipName_variant, doc_QDBusVariant_variant);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusVariant_setVariant, "setVariant(self, dBusVariant: Any)");

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

    {
        const ::QVariant* a0;
        int a0State = 0;
        ::QDBusVariant *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ1", &sipSelf, sipType_QDBusVariant, &sipCpp, sipType_QVariant, &a0, &a0State))
        {
            sipCpp->setVariant(*a0);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusVariant, sipName_setVariant, doc_QDBusVariant_setVariant);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusVariant_swap, "swap(self, other: QDBusVariant)");

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

    {
        ::QDBusVariant* a0;
        ::QDBusVariant *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "BJ9", &sipSelf, sipType_QDBusVariant, &sipCpp, sipType_QDBusVariant, &a0))
        {
            sipCpp->swap(*a0);

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusVariant, sipName_swap, doc_QDBusVariant_swap);

    return SIP_NULLPTR;
}


extern "C" {static PyObject *slot_QDBusVariant___ne__(PyObject *, PyObject *);}
static PyObject *slot_QDBusVariant___ne__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusVariant *sipCpp = reinterpret_cast< ::QDBusVariant *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusVariant));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusVariant* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QDBusVariant, &a0))
        {
            bool sipRes;

            sipRes = !operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, ne_slot, sipType_QDBusVariant, sipSelf, sipArg);
}


extern "C" {static PyObject *slot_QDBusVariant___eq__(PyObject *, PyObject *);}
static PyObject *slot_QDBusVariant___eq__(PyObject *sipSelf, PyObject *sipArg)
{
    ::QDBusVariant *sipCpp = reinterpret_cast< ::QDBusVariant *>(sipGetCppPtr((sipSimpleWrapper *)sipSelf, sipType_QDBusVariant));

    if (!sipCpp)
        return SIP_NULLPTR;

    PyObject *sipParseErr = SIP_NULLPTR;

    {
        const ::QDBusVariant* a0;

        if (sipParseArgs(&sipParseErr, sipArg, "1J9", sipType_QDBusVariant, &a0))
        {
            bool sipRes;

            sipRes = operator==((*sipCpp), *a0);

            return PyBool_FromLong(sipRes);
        }
    }

    Py_XDECREF(sipParseErr);

    return sipPySlotExtend(&sipModuleAPI_QtDBus, eq_slot, sipType_QDBusVariant, sipSelf, sipArg);
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const ::QVariant* a0;
        int a0State = 0;

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, SIP_NULLPTR, sipUnused, "J1", sipType_QVariant, &a0, &a0State))
        {
            sipCpp = new ::QDBusVariant(*a0);
            sipReleaseType(const_cast< ::QVariant *>(a0), sipType_QVariant, a0State);

            return sipCpp;
        }
    }

    {
        const ::QDBusVariant* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's Python slots. */
static sipPySlotDef slots_QDBusVariant[] = {
    {(void *)slot_QDBusVariant___ne__, ne_slot},
    {(void *)slot_QDBusVariant___eq__, eq_slot},
    {0, (sipPySlotType)0}
};


static PyMethodDef methods_QDBusVariant[] = {
    {sipName_setVariant, meth_QDBusVariant_setVariant, METH_VARARGS, doc_QDBusVariant_setVariant},
    {sipName_swap, meth_QDBusVariant_swap, METH_VARARGS, doc_QDBusVariant_swap},
    {sipName_variant, meth_QDBusVariant_variant, METH_VARARGS, doc_QDBusVariant_variant}
};

PyDoc_STRVAR(doc_QDBusVariant, "\1QDBusVariant()\n"
"QDBusVariant(dBusVariant: Any)\n"
"QDBusVariant(a0: QDBusVariant)");


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


sipClassTypeDef sipTypeDef_QtDBus_QDBusVariant = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDBusVariant,
        SIP_NULLPTR,
        &plugin_QDBusVariant,
    },
    {
        sipNameNr_QDBusVariant,
        {0, 0, 1},
        3, methods_QDBusVariant,
        0, SIP_NULLPTR,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QDBusVariant,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    slots_QDBusVariant,
    init_type_QDBusVariant,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDBusVariant,
    assign_QDBusVariant,
    array_QDBusVariant,
    copy_QDBusVariant,
    release_QDBusVariant,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QDBusVariant,
    sizeof (::QDBusVariant),
};
