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

#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbusinterface.sip"
#include <qdbusinterface.h>
#line 29 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"

#line 24 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 41 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbusconnection.sip"
#include <qdbusconnection.h>
#line 36 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobject.sip"
#include <qobject.h>
#line 39 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qmetaobject.sip"
#include <qmetaobject.h>
#line 42 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbuspendingcall.sip"
#include <qdbuspendingcall.h>
#line 45 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 48 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 51 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbusmessage.sip"
#include <qdbusmessage.h>
#line 54 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbusconnection.sip"
#include <qdbusconnection.h>
#line 57 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtDBus/qdbuserror.sip"
#include <qdbuserror.h>
#line 60 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 151 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 65 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 68 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 245 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 71 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 232 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qcoreevent.sip"
#include <qcoreevent.h>
#line 74 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 28 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 77 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 30 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qbytearray.sip"
#include <qbytearray.h>
#line 80 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 135 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qpycore_qlist.sip"
#include <qlist.h>
#line 83 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qnamespace.sip"
#include <qnamespace.h>
#line 150 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qtextstream.sip"
#include <qtextstream.h>
#line 88 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qthread.sip"
#include <qthread.h>
#line 91 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 25 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qflags.sip"
#include <qglobal.h>
#line 94 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qregularexpression.sip"
#include <qregularexpression.h>
#line 97 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"
#line 26 "/build/pyqt6/src/PyQt6-6.3.1/sip/QtCore/qobjectdefs.sip"
#include <qobjectdefs.h>
#line 100 "/build/pyqt6/src/PyQt6-6.3.1/build/QtDBus/sipQtDBusQDBusInterface.cpp"


class sipQDBusInterface : public  ::QDBusInterface
{
public:
    sipQDBusInterface(const  ::QString&,const  ::QString&,const  ::QString&,const  ::QDBusConnection&, ::QObject*);
    virtual ~sipQDBusInterface();

    int qt_metacall(QMetaObject::Call, int, void **) SIP_OVERRIDE;
    void *qt_metacast(const char *) SIP_OVERRIDE;
    const QMetaObject *metaObject() const SIP_OVERRIDE;

    /*
     * There is a protected method for every virtual method visible from
     * this class.
     */
protected:
    void disconnectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void connectNotify(const  ::QMetaMethod&) SIP_OVERRIDE;
    void customEvent( ::QEvent*) SIP_OVERRIDE;
    void childEvent( ::QChildEvent*) SIP_OVERRIDE;
    void timerEvent( ::QTimerEvent*) SIP_OVERRIDE;
    bool eventFilter( ::QObject*, ::QEvent*) SIP_OVERRIDE;
    bool event( ::QEvent*) SIP_OVERRIDE;

public:
    sipSimpleWrapper *sipPySelf;

private:
    sipQDBusInterface(const sipQDBusInterface &);
    sipQDBusInterface &operator = (const sipQDBusInterface &);

    char sipPyMethods[7];
};

sipQDBusInterface::sipQDBusInterface(const  ::QString& a0,const  ::QString& a1,const  ::QString& a2,const  ::QDBusConnection& a3, ::QObject*a4):  ::QDBusInterface(a0,a1,a2,a3,a4), sipPySelf(SIP_NULLPTR)
{
    memset(sipPyMethods, 0, sizeof (sipPyMethods));
}

sipQDBusInterface::~sipQDBusInterface()
{
    sipInstanceDestroyedEx(&sipPySelf);
}

const QMetaObject *sipQDBusInterface::metaObject() const
{
    if (sipGetInterpreter())
        return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : sip_QtDBus_qt_metaobject(sipPySelf,sipType_QDBusInterface);

    return  ::QDBusInterface::metaObject();
}

int sipQDBusInterface::qt_metacall(QMetaObject::Call _c,int _id,void **_a)
{
    _id =  ::QDBusInterface::qt_metacall(_c,_id,_a);

    if (_id >= 0)
    {
        SIP_BLOCK_THREADS
        _id = sip_QtDBus_qt_metacall(sipPySelf,sipType_QDBusInterface,_c,_id,_a);
        SIP_UNBLOCK_THREADS
    }

    return _id;
}

void *sipQDBusInterface::qt_metacast(const char *_clname)
{
    void *sipCpp;

    return (sip_QtDBus_qt_metacast(sipPySelf, sipType_QDBusInterface, _clname, &sipCpp) ? sipCpp :  ::QDBusInterface::qt_metacast(_clname));
}

void sipQDBusInterface::disconnectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[0], &sipPySelf, SIP_NULLPTR, sipName_disconnectNotify);

    if (!sipMeth)
    {
         ::QDBusInterface::disconnectNotify(a0);
        return;
    }

    extern void sipVH_QtDBus_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtDBus_0(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQDBusInterface::connectNotify(const  ::QMetaMethod& a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[1], &sipPySelf, SIP_NULLPTR, sipName_connectNotify);

    if (!sipMeth)
    {
         ::QDBusInterface::connectNotify(a0);
        return;
    }

    extern void sipVH_QtDBus_0(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *, const  ::QMetaMethod&);

    sipVH_QtDBus_0(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQDBusInterface::customEvent( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[2], &sipPySelf, SIP_NULLPTR, sipName_customEvent);

    if (!sipMeth)
    {
         ::QDBusInterface::customEvent(a0);
        return;
    }

    extern void sipVH_QtDBus_1(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    sipVH_QtDBus_1(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQDBusInterface::childEvent( ::QChildEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[3], &sipPySelf, SIP_NULLPTR, sipName_childEvent);

    if (!sipMeth)
    {
         ::QDBusInterface::childEvent(a0);
        return;
    }

    extern void sipVH_QtDBus_2(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QChildEvent*);

    sipVH_QtDBus_2(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

void sipQDBusInterface::timerEvent( ::QTimerEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[4], &sipPySelf, SIP_NULLPTR, sipName_timerEvent);

    if (!sipMeth)
    {
         ::QDBusInterface::timerEvent(a0);
        return;
    }

    extern void sipVH_QtDBus_3(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QTimerEvent*);

    sipVH_QtDBus_3(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}

bool sipQDBusInterface::eventFilter( ::QObject*a0, ::QEvent*a1)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[5], &sipPySelf, SIP_NULLPTR, sipName_eventFilter);

    if (!sipMeth)
        return  ::QDBusInterface::eventFilter(a0,a1);

    extern bool sipVH_QtDBus_4(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QObject*, ::QEvent*);

    return sipVH_QtDBus_4(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0, a1);
}

bool sipQDBusInterface::event( ::QEvent*a0)
{
    sip_gilstate_t sipGILState;
    PyObject *sipMeth;

    sipMeth = sipIsPyMethod(&sipGILState, &sipPyMethods[6], &sipPySelf, SIP_NULLPTR, sipName_event);

    if (!sipMeth)
        return  ::QDBusInterface::event(a0);

    extern bool sipVH_QtDBus_5(sip_gilstate_t, sipVirtErrorHandlerFunc, sipSimpleWrapper *, PyObject *,  ::QEvent*);

    return sipVH_QtDBus_5(sipGILState, sipImportedVirtErrorHandlers_QtDBus_QtCore[0].iveh_handler, sipPySelf, sipMeth, a0);
}


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

    if (targetType == sipType_QDBusInterface)
        return sipCppV;

    sipCppV = ((const sipClassTypeDef *)sipType_QDBusAbstractInterface)->ctd_cast(static_cast< ::QDBusAbstractInterface *>(sipCpp), targetType);
    if (sipCppV)
        return sipCppV;

    return SIP_NULLPTR;
}


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

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


extern "C" {static void dealloc_QDBusInterface(sipSimpleWrapper *);}
static void dealloc_QDBusInterface(sipSimpleWrapper *sipSelf)
{
    if (sipIsDerivedClass(sipSelf))
        reinterpret_cast<sipQDBusInterface *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR;

    if (sipIsOwnedByPython(sipSelf))
    {
        release_QDBusInterface(sipGetAddress(sipSelf), sipIsDerivedClass(sipSelf));
    }
}


extern "C" {static void *init_type_QDBusInterface(sipSimpleWrapper *, PyObject *, PyObject *, PyObject **, PyObject **, PyObject **);}
static void *init_type_QDBusInterface(sipSimpleWrapper *sipSelf, PyObject *sipArgs, PyObject *sipKwds, PyObject **sipUnused, PyObject **sipOwner, PyObject **sipParseErr)
{
    sipQDBusInterface *sipCpp = SIP_NULLPTR;

    {
        const  ::QString* a0;
        int a0State = 0;
        const  ::QString* a1;
        int a1State = 0;
        const  ::QString& a2def = QString();
        const  ::QString* a2 = &a2def;
        int a2State = 0;
        const  ::QDBusConnection& a3def = QDBusConnection::sessionBus();
        const  ::QDBusConnection* a3 = &a3def;
         ::QObject* a4 = 0;

        static const char *sipKwdList[] = {
            SIP_NULLPTR,
            SIP_NULLPTR,
            sipName_interface,
            sipName_connection,
            sipName_parent,
        };

        if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, sipKwdList, sipUnused, "J1J1|J1J9JH", sipType_QString, &a0, &a0State, sipType_QString, &a1, &a1State, sipType_QString, &a2, &a2State, sipType_QDBusConnection, &a3, sipType_QObject, &a4, sipOwner))
        {
            sipCpp = new sipQDBusInterface(*a0,*a1,*a2,*a3,a4);
            sipReleaseType(const_cast< ::QString *>(a0), sipType_QString, a0State);
            sipReleaseType(const_cast< ::QString *>(a1), sipType_QString, a1State);
            sipReleaseType(const_cast< ::QString *>(a2), sipType_QString, a2State);

            sipCpp->sipPySelf = sipSelf;

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


/* Define this type's super-types. */
static sipEncodedTypeDef supers_QDBusInterface[] = {{3, 255, 1}};

PyDoc_STRVAR(doc_QDBusInterface, "\1QDBusInterface(str, str, interface: str = '', connection: QDBusConnection = QDBusConnection.sessionBus(), parent: QObject = None)");


static pyqt6ClassPluginDef plugin_QDBusInterface = {
    & ::QDBusInterface::staticMetaObject,
    SIP_NULLPTR,
    SIP_NULLPTR
};


sipClassTypeDef sipTypeDef_QtDBus_QDBusInterface = {
    {
        SIP_NULLPTR,
        SIP_TYPE_SCC|SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDBusInterface,
        SIP_NULLPTR,
        &plugin_QDBusInterface
    },
    {
        sipNameNr_QDBusInterface,
        {0, 0, 1},
        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_QDBusInterface,
    -1,
    -1,
    supers_QDBusInterface,
    SIP_NULLPTR,
    init_type_QDBusInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDBusInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    release_QDBusInterface,
    cast_QDBusInterface,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QDBusInterface),
};
