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

#line 27 "/build/pyqt5/src/PyQt5-5.15.7/sip/QtCore/qstring.sip"
#include <qstring.h>
#line 33 "/build/pyqt5/src/PyQt5-5.15.7/build/QtDBus/sipQtDBusQDBusError.cpp"


PyDoc_STRVAR(doc_QDBusError_type, "type(self) -> QDBusError.ErrorType");

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

    {
        const  ::QDBusError *sipCpp;

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

            sipRes = sipCpp->type();

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

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_type, doc_QDBusError_type);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusError_name, "name(self) -> str");

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

    {
        const  ::QDBusError *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_name, doc_QDBusError_name);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusError_message, "message(self) -> str");

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

    {
        const  ::QDBusError *sipCpp;

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

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

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

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_message, doc_QDBusError_message);

    return SIP_NULLPTR;
}


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

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

    {
        const  ::QDBusError *sipCpp;

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

            sipRes = sipCpp->isValid();

            return PyBool_FromLong(sipRes);
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_isValid, doc_QDBusError_isValid);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusError_errorString, "errorString(QDBusError.ErrorType) -> str");

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

    {
         ::QDBusError::ErrorType a0;

        if (sipParseArgs(&sipParseErr, sipArgs, "E", sipType_QDBusError_ErrorType, &a0))
        {
             ::QString*sipRes;

            sipRes = new  ::QString( ::QDBusError::errorString(a0));

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

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_errorString, doc_QDBusError_errorString);

    return SIP_NULLPTR;
}


PyDoc_STRVAR(doc_QDBusError_swap, "swap(self, QDBusError)");

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

    {
         ::QDBusError* a0;
         ::QDBusError *sipCpp;

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

            Py_INCREF(Py_None);
            return Py_None;
        }
    }

    sipNoMethod(sipParseErr, sipName_QDBusError, sipName_swap, doc_QDBusError_swap);

    return SIP_NULLPTR;
}


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


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


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


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


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

    {
        const  ::QDBusError* a0;

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

            return sipCpp;
        }
    }

    return SIP_NULLPTR;
}


static PyMethodDef methods_QDBusError[] = {
    {sipName_errorString, meth_QDBusError_errorString, METH_VARARGS, doc_QDBusError_errorString},
    {sipName_isValid, meth_QDBusError_isValid, METH_VARARGS, doc_QDBusError_isValid},
    {sipName_message, meth_QDBusError_message, METH_VARARGS, doc_QDBusError_message},
    {sipName_name, meth_QDBusError_name, METH_VARARGS, doc_QDBusError_name},
    {sipName_swap, meth_QDBusError_swap, METH_VARARGS, doc_QDBusError_swap},
    {sipName_type, meth_QDBusError_type, METH_VARARGS, doc_QDBusError_type}
};

static sipEnumMemberDef enummembers_QDBusError[] = {
    {sipName_AccessDenied, static_cast<int>( ::QDBusError::AccessDenied), 17},
    {sipName_AddressInUse, static_cast<int>( ::QDBusError::AddressInUse), 17},
    {sipName_BadAddress, static_cast<int>( ::QDBusError::BadAddress), 17},
    {sipName_Disconnected, static_cast<int>( ::QDBusError::Disconnected), 17},
    {sipName_Failed, static_cast<int>( ::QDBusError::Failed), 17},
    {sipName_InternalError, static_cast<int>( ::QDBusError::InternalError), 17},
    {sipName_InvalidArgs, static_cast<int>( ::QDBusError::InvalidArgs), 17},
    {sipName_InvalidInterface, static_cast<int>( ::QDBusError::InvalidInterface), 17},
    {sipName_InvalidMember, static_cast<int>( ::QDBusError::InvalidMember), 17},
    {sipName_InvalidObjectPath, static_cast<int>( ::QDBusError::InvalidObjectPath), 17},
    {sipName_InvalidService, static_cast<int>( ::QDBusError::InvalidService), 17},
    {sipName_InvalidSignature, static_cast<int>( ::QDBusError::InvalidSignature), 17},
    {sipName_LimitsExceeded, static_cast<int>( ::QDBusError::LimitsExceeded), 17},
    {sipName_NoError, static_cast<int>( ::QDBusError::NoError), 17},
    {sipName_NoMemory, static_cast<int>( ::QDBusError::NoMemory), 17},
    {sipName_NoNetwork, static_cast<int>( ::QDBusError::NoNetwork), 17},
    {sipName_NoReply, static_cast<int>( ::QDBusError::NoReply), 17},
    {sipName_NoServer, static_cast<int>( ::QDBusError::NoServer), 17},
    {sipName_NotSupported, static_cast<int>( ::QDBusError::NotSupported), 17},
    {sipName_Other, static_cast<int>( ::QDBusError::Other), 17},
    {sipName_PropertyReadOnly, static_cast<int>( ::QDBusError::PropertyReadOnly), 17},
    {sipName_ServiceUnknown, static_cast<int>( ::QDBusError::ServiceUnknown), 17},
    {sipName_TimedOut, static_cast<int>( ::QDBusError::TimedOut), 17},
    {sipName_Timeout, static_cast<int>( ::QDBusError::Timeout), 17},
    {sipName_UnknownInterface, static_cast<int>( ::QDBusError::UnknownInterface), 17},
    {sipName_UnknownMethod, static_cast<int>( ::QDBusError::UnknownMethod), 17},
    {sipName_UnknownObject, static_cast<int>( ::QDBusError::UnknownObject), 17},
    {sipName_UnknownProperty, static_cast<int>( ::QDBusError::UnknownProperty), 17},
};

PyDoc_STRVAR(doc_QDBusError, "\1QDBusError(QDBusError)");


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


sipClassTypeDef sipTypeDef_QtDBus_QDBusError = {
    {
        -1,
        SIP_NULLPTR,
        SIP_NULLPTR,
        SIP_TYPE_SUPER_INIT|SIP_TYPE_LIMITED_API|SIP_TYPE_CLASS,
        sipNameNr_QDBusError,
        SIP_NULLPTR,
        &plugin_QDBusError
    },
    {
        sipNameNr_QDBusError,
        {0, 0, 1},
        6, methods_QDBusError,
        28, enummembers_QDBusError,
        0, SIP_NULLPTR,
        {SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR, SIP_NULLPTR},
    },
    doc_QDBusError,
    -1,
    sipNameNr_sip_simplewrapper,
    SIP_NULLPTR,
    SIP_NULLPTR,
    init_type_QDBusError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    dealloc_QDBusError,
    assign_QDBusError,
    SIP_NULLPTR,
    copy_QDBusError,
    release_QDBusError,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    SIP_NULLPTR,
    sizeof ( ::QDBusError),
};
