/*
 * 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 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbuspendingcall.sip"
#include <qdbuspendingcall.h>
#line 29 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusPendingCall.cpp"

#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbusmessage.sip"
#include <qdbusmessage.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusPendingCall.cpp"
#line 26 "/build/pyqt5/src/PyQt5-5.15.11/sip/QtDBus/qdbuserror.sip"
#include <qdbuserror.h>
#line 36 "/build/pyqt5/src/PyQt5-5.15.11/build/QtDBus/sipQtDBusQDBusPendingCall.cpp"


PyDoc_STRVAR(doc_QDBusPendingCall_fromError, "fromError(error: QDBusError) -> QDBusPendingCall");

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

    {
        const ::QDBusError* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QDBusError, &a0))
        {
            ::QDBusPendingCall*sipRes;

            sipRes = new ::QDBusPendingCall(::QDBusPendingCall::fromError(*a0));

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

    sipNoMethod(sipParseErr, sipName_QDBusPendingCall, sipName_fromError, doc_QDBusPendingCall_fromError);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusPendingCall_fromCompletedCall, "fromCompletedCall(message: QDBusMessage) -> QDBusPendingCall");

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

    {
        const ::QDBusMessage* a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "J9", sipType_QDBusMessage, &a0))
        {
            ::QDBusPendingCall*sipRes;

            sipRes = new ::QDBusPendingCall(::QDBusPendingCall::fromCompletedCall(*a0));

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

    sipNoMethod(sipParseErr, sipName_QDBusPendingCall, sipName_fromCompletedCall, doc_QDBusPendingCall_fromCompletedCall);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusPendingCall_swap, "swap(self, other: QDBusPendingCall)");

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

    {
        ::QDBusPendingCall* a0;
        ::QDBusPendingCall *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusPendingCall, sipName_swap, doc_QDBusPendingCall_swap);

    return SIP_NULLPTR;
}


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


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


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


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


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

    {
        const ::QDBusPendingCall* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QDBusPendingCall[] = {
    {sipName_fromCompletedCall, meth_QDBusPendingCall_fromCompletedCall, METH_VARARGS, doc_QDBusPendingCall_fromCompletedCall},
    {sipName_fromError, meth_QDBusPendingCall_fromError, METH_VARARGS, doc_QDBusPendingCall_fromError},
    {sipName_swap, meth_QDBusPendingCall_swap, METH_VARARGS, doc_QDBusPendingCall_swap}
};

PyDoc_STRVAR(doc_QDBusPendingCall, "\1QDBusPendingCall(other: QDBusPendingCall)");


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


sipClassTypeDef sipTypeDef_QtDBus_QDBusPendingCall = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDBusPendingCall,
        SIP_NULLPTR,
        &plugin_QDBusPendingCall,
    },
    {
        sipNameNr_QDBusPendingCall,
        {0, 0, 1},
        3, methods_QDBusPendingCall,
        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_QDBusPendingCall,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QDBusPendingCall,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDBusPendingCall,
    assign_QDBusPendingCall,
    SIP_NULLPTR,
    copy_QDBusPendingCall,
    release_QDBusPendingCall,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof (::QDBusPendingCall),
};
