/*
 * Interface wrapper code.
 *
 * Generated by SIP 6.6.2
 *
 * Copyright (c) 2022 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 24 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDBus/qpydbuspendingreply.sip"
#include <qpydbuspendingreply.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQPyDBusPendingReply.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDBus/qdbuspendingcall.sip"
#include <qdbuspendingcall.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQPyDBusPendingReply.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDBus/qdbusmessage.sip"
#include <qdbusmessage.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQPyDBusPendingReply.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtDBus/qdbuserror.sip"
#include <qdbuserror.h>
#line 39 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQPyDBusPendingReply.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qvariant.sip"
#include <qvariant.h>
#line 42 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQPyDBusPendingReply.cpp"


PyDoc_STRVAR(doc_QPyDBusPendingReply_argumentAt, "argumentAt(self, int) -> Any");

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

    {
        int a0;
        const  ::QPyDBusPendingReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "Bi", &sipSelf, sipType_QPyDBusPendingReply, &sipCpp, &a0))
        {
             ::QVariant*sipRes;

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QVariant(sipCpp->argumentAt(a0));
            Py_END_ALLOW_THREADS

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

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_argumentAt, doc_QPyDBusPendingReply_argumentAt);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_error, "error(self) -> QDBusError");

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

    {
        const  ::QPyDBusPendingReply *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QDBusError(sipCpp->error());
            Py_END_ALLOW_THREADS

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

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_error, doc_QPyDBusPendingReply_error);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_isError, "isError(self) -> bool");

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

    {
        const  ::QPyDBusPendingReply *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->isError();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_isError, doc_QPyDBusPendingReply_isError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_isFinished, "isFinished(self) -> bool");

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

    {
        const  ::QPyDBusPendingReply *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->isFinished();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_isFinished, doc_QPyDBusPendingReply_isFinished);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_isValid, "isValid(self) -> bool");

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

    {
        const  ::QPyDBusPendingReply *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = sipCpp->isValid();
            Py_END_ALLOW_THREADS

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_isValid, doc_QPyDBusPendingReply_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_reply, "reply(self) -> QDBusMessage");

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

    {
        const  ::QPyDBusPendingReply *sipCpp;

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

            Py_BEGIN_ALLOW_THREADS
            sipRes = new  ::QDBusMessage(sipCpp->reply());
            Py_END_ALLOW_THREADS

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

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_reply, doc_QPyDBusPendingReply_reply);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_waitForFinished, "waitForFinished(self)");

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

    {
         ::QPyDBusPendingReply *sipCpp;

        if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_QPyDBusPendingReply, &sipCpp))
        {
            Py_BEGIN_ALLOW_THREADS
            sipCpp->waitForFinished();
            Py_END_ALLOW_THREADS

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_waitForFinished, doc_QPyDBusPendingReply_waitForFinished);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QPyDBusPendingReply_value, "value(self, type: object = None) -> object");

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

    {
        PyObject * a0 = 0;
        const  ::QPyDBusPendingReply *sipCpp;

        static const char *sipKwdList[] = {
            sipName_type,
        };

        if (sipParseKwdArgs(&sipParseErr, sipArgs, sipKwds, sipKwdList, SIP_NULLPTR, "B|P0", &sipSelf, sipType_QPyDBusPendingReply, &sipCpp, &a0))
        {
            PyObject * sipRes;

            sipRes = sipCpp->value(a0);

            return sipRes;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingReply, sipName_value, doc_QPyDBusPendingReply_value);

    return SIP_NULLPTR;
}


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

    if (targetType == sipType_QPyDBusPendingReply)
        return sipCppV;

    if (targetType == sipType_QDBusPendingCall)
        return static_cast< ::QDBusPendingCall *>(sipCpp);

    return SIP_NULLPTR;
}


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


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


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


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


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


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


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

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

            return sipCpp;
        }
    }

    {
        const  ::QPyDBusPendingReply* a0;

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

            return sipCpp;
        }
    }

    {
        const  ::QDBusPendingCall* a0;

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

            return sipCpp;
        }
    }

    {
        const  ::QDBusMessage* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


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


static PyMethodDef methods_QPyDBusPendingReply[] = {
    {sipName_argumentAt, meth_QPyDBusPendingReply_argumentAt, METH_VARARGS, doc_QPyDBusPendingReply_argumentAt},
    {sipName_error, meth_QPyDBusPendingReply_error, METH_VARARGS, doc_QPyDBusPendingReply_error},
    {sipName_isError, meth_QPyDBusPendingReply_isError, METH_VARARGS, doc_QPyDBusPendingReply_isError},
    {sipName_isFinished, meth_QPyDBusPendingReply_isFinished, METH_VARARGS, doc_QPyDBusPendingReply_isFinished},
    {sipName_isValid, meth_QPyDBusPendingReply_isValid, METH_VARARGS, doc_QPyDBusPendingReply_isValid},
    {sipName_reply, meth_QPyDBusPendingReply_reply, METH_VARARGS, doc_QPyDBusPendingReply_reply},
    {sipName_value, SIP_MLMETH_CAST(meth_QPyDBusPendingReply_value), METH_VARARGS|METH_KEYWORDS, doc_QPyDBusPendingReply_value},
    {sipName_waitForFinished, meth_QPyDBusPendingReply_waitForFinished, METH_VARARGS, doc_QPyDBusPendingReply_waitForFinished}
};

PyDoc_STRVAR(doc_QPyDBusPendingReply, "\1QDBusPendingReply()\n"
"QDBusPendingReply(QDBusPendingReply)\n"
"QDBusPendingReply(QDBusPendingCall)\n"
"QDBusPendingReply(QDBusMessage)");


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


sipClassTypeDef sipTypeDef_QtDBus_QPyDBusPendingReply = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QPyDBusPendingReply,
        SIP_NULLPTR,
        &plugin_QPyDBusPendingReply
    },
    {
        sipNameNr_QDBusPendingReply,
        {0, 0, 1},
        8, methods_QPyDBusPendingReply,
        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_QPyDBusPendingReply,
    -1,
    -1,
    supers_QPyDBusPendingReply,
    SIP_NULLPTR,
    init_type_QPyDBusPendingReply,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QPyDBusPendingReply,
    assign_QPyDBusPendingReply,
    array_QPyDBusPendingReply,
    copy_QPyDBusPendingReply,
    release_QPyDBusPendingReply,
    cast_QPyDBusPendingReply,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    array_delete_QPyDBusPendingReply,
    sizeof ( ::QPyDBusPendingReply),
};
